Re: cvs: php4 /ext/xml xml.c
| From: | Moriyoshi Koizumi | Date: | Sun, 15 Jun 2003 17:58:46 +0000 |
| Subject: | Re: cvs: php4 /ext/xml xml.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-21749@lists.php.net to get a copy of this message | ||
> I am fine with having PHP handle all memory management, but if this is the
> case, I would say a function somewhere outside the xml extensions that is
> called in MINIT of all the libxml enabled extensions. I cant say if this
> will complicate debugging this stuff, but would like that noted as a
> possible concern (if anyone would care to comment on it).
Right, for an even further concern, what if libxml was used in a portion
of the entire process outside the PHP code..? (e.g. in a Apache module).
If such collision could well happen, we'd be better off leaving it use the
ordinary allocators.
On the other hand, it should be worth paying attention to that circular
references are big threats against reference count based garbage
collection. As we have to handle memory allocations with great care in
threaded servers, it'd be safer to use Zend's MM here.
> Then, do we even need to worry about re-entrance then?
> So, we may define the same memory handling functions a few times.
> xmlInitParser is already re-entrant safe.
IMO the point is xmlInitParse() itself is designed to be reentrant while
it isn't when it comes to the memory manager.. But I'm not sure if libxml
is actually reentrant then :)
Moriyoshi