Re: [xml] How and when to use LIBXML_THREAD_ALLOC_ENABLED

On Wed, Feb 04, 2004 at 02:21:25PM +0100, Kasimier Buchcik wrote:

I'm currently playing with the various thread schemas supported by 
libxml2 (ctls, posix and native) and came accross 
LIBXML_THREAD_ALLOC_ENABLED in "globals.h". There it reads: "In general 
the memory allocation entry points are not kept thread specific but this 
can be overridden by LIBXML_THREAD_ALLOC_ENABLED".

Since I've got only a slight image of what this could mean, I'm asking 
if someone of you could explain what it does exactly (and when it's 
usefull) and how to try it out, since my naive build with that 
definition turned on, led to unresolved symbols (__xmlFree, __xmlMalloc, 

  Hum, the support might be broken right now but the idea behind it was
to have the memory allocation routine used (xmlMalloc, xmlFree ...)
be redefined to their __ counterparts, which then would use the per-thread
values that you can find in the xmlGlobalState structure (globals.h).
That way each thread was able to use its own memory pool. It's IMHO
a bit fragile, but that was the intent. I don't know why __xmlFree and
related definitions don't seems to exist anymore.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]