Hi,

We are seeing a large memory leak in PHP 4.2.3 for NetWare. We just load mod_php 
alongwith apache 1.3 and then unload apache without executing any script. We find that 
there is a memory leak of about 14KB. The same is observed when we load the command 
line version of PHP also and unload it.

In fact, it was earlier leaking about 55KB. We added the following code in the 
zend_shutdown function in zend.c. These release about 21KB.
      destroy_zend_class(&zend_standard_class_def);
      zend_hash_destroy(&EG(persistent_list));
      zend_hash_destroy(EG(zend_constants));
      free(EG(zend_constants));
      zend_hash_destroy(GLOBAL_CONSTANTS_TABLE);
      free(GLOBAL_CONSTANTS_TABLE);

Can you throw some light on how we can go about releasing the other 14KB? I feel the 
extra is also in Zend. Or is it that Apache may be caching some memory and freeing it 
after some time. But this doesn't explain why the command line PHP (cli) is also 
leaking memory.

This is quite a critical issue with NetWare customers and so your help in this is 
deeply appreciated.

Thanks,
Ananth.



--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to