Re: Fixing the libxml memory allocation situation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fixing the libxml memory allocation situation
Date: 2009-05-18 15:13:38
Message-ID: 734.1242659618@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> On Tue, May 12, 2009 at 05:55:13PM -0400, Tom Lane wrote:
>> I've about come to the conclusion that the only real fix is to abandon
>> our attempt to manage libxml's memory usage.

> Perhaps we could suggest to the libxml authors that it would be nice of
> the allocation functions could be controlled in a non-global way, so
> that different users of the same library can control their own memory
> usage without affecting others.

They probably see the xmlMemSetup hooks as strictly for debugging, not
something for production use. Something that makes them significantly
more complex might well be a net step backwards for that purpose.

If anyone does try to pursue this with libxml upstream, don't forget to
mention that the error handling callbacks (xmlSetGenericErrorFunc) are
equally poorly designed for multiple callers.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2009-05-18 15:19:27 Compiler warning
Previous Message Martijn van Oosterhout 2009-05-18 14:45:52 Re: Fixing the libxml memory allocation situation