----- Original Message ----- From: Moriyoshi Koizumi > > Looks pretty much pretty much how it is done in libxml (xmlGetGlobalState). > > Will this cause any problems mandating the memory behavor in /etc/xml? > > As far as I looked over the libxml code, xmlMemSetup doesn't work > in sync with the other part of the library as it seems to take it for > granted that xmlMemSetup() is called prior to any libxml initialisation > routines. That's why I'm under the impression that it's our task to to do > it in the PHP side.
If you want to override the memory handling, i.e. currently it uses free/malloc/realloc/strdup, then yes it will need to be setup. And it has to be setup prior to xmlInitParser as the globals will be allocated via that particular memory handler. Another thing, if the memory handler is changed, I am not sure what the affect on trying to debug the libxml memory will be. This is very important as, at least working in dom, there are so many scenarios that can happen and it would take forever trying to fix leaks coming from libxml. any reason you want to change the memory handling? I would just think that it would be one more thing that we would have to deal with. What I meant about the xmlGetGlobalState was how it handle the one time initialzation under threading. Rob -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
