Re: Fixing the libxml memory allocation situation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fixing the libxml memory allocation situation
Date
Msg-id 734.1242659618@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixing the libxml memory allocation situation  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.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


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Fixing the libxml memory allocation situation
Next
From: Fujii Masao
Date:
Subject: Compiler warning