Re: cvs: php4 /ext/xml xml.c

From: Date: Sun, 15 Jun 2003 12:08:54 +0000
Subject: Re: cvs: php4 /ext/xml xml.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-21722@lists.php.net to get a copy of this message
Hi, "Rob Richards" <rrichards@ctindustries.net> wrote: > xmlInitThreads currently doesnt do anything right now. It is just a function > for future use. In a non threaded environment, it really doesnt matter. You > can get away without even calling any init routines as they would be called > upon the first invocation of the parser, but once you get into a threaded > environment, libxml needs to initialize itself on the main thread. Well, virtually xmlInitThreads() doesn't do anything as of the current libxml, but I'd not found such a description in the documentation that states xmlInitThreads() is reserved for future use..? > Unless there is a way to inject it after the start-up of the Zend MM, this > is the only spot I know of to get the initialization in there. Other than > for consistancy is there any problem in having it initialize before the Zend > MM? In compat.c, xmlMemSetup() is called with XML_ParserCreate_MM() to initialise the libxml MM so it would take advantage of Zend allocators (emalloc family) instead of the plain libc allocators. I know that's a kind of bogus stuff, but then how should we handle it? 1. statically initialise them in PHP_MINIT_FUNCTION() in advance of any call of XML_ParserCreateMM() at runtime and ignore the second parameter passed to XML_ParserCreateMM(). 2. use the libc allocators in any way. Moriyoshi

« previous php.cvs (#21722) next »