Re: efree/emalloc in sapi
| From: | Stanislav Malyshev | Date: | Wed, 04 Apr 2001 10:32:03 +0000 |
| Subject: | Re: efree/emalloc in sapi | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-50821@lists.php.net to get a copy of this message | ||
BB>> can someone tell me the exact places where emalloced memory
BB>> begins to be tracked and where the leaks are efreed?
Generally, the emalloc should be working all the way since
start_memory_manager was called - which means, from engine startup. The
"request cleanup" (freeing all non-persistent memory blocks) happens on
shutdown_memory_manager, which is called from php_request_shutdown,
after calling request shutdown routines for all modules and extensions,
including SAPI request shutdown.
Giving second look on what I wrote, you code (from what I got from your
description) generally should be safe to use emalloc... Maybe you have
some other problem there?
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115