Re: [ZEND-ENGINE-CVS] cvs: Zend / zend.czend.hzend_config.nw.h
| From: | Ananth Kesari | Date: | Tue, 07 Jan 2003 07:29:52 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: Zend / zend.czend.hzend_config.nw.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-755@lists.php.net to get a copy of this message | ||
Andi,
On NetWare, we do not have a concept of Process and having Threads
within them. Everything is per-thread basis here. So, we find on NetWare
that for every script that we execute, the memory leak keeps increasing.
Once this reaches a threshold level, the server hangs and does not serve
any PHP pages. We will then need to restart the server and start all
over again! On production servers the memory leak goes up tremendously
high quite quickly and it means that one may have to do one restart
every other day! And this is definitely not acceptable to our customers.
So, we are concerned about the memory leaks.
The fix I have made reduces the memory leaks, but it does not remove it
completely. Even with this fix, we see a leak of 13992 bytes by just
loading Apache (configured to load PHP) and unloading it (which unloads
PHP also). This is indeed a big memory leak.
Can you please throw some light on how we can reduce the leaks
further?
Thanks,
Ananth.
>>> Andi Gutmans <andi@zend.com> 01/07/03 02:02AM >>>
At 02:18 AM 1/6/2003 -0700, Ananth Kesari wrote:
>The patch is done to fix some memory leaks. The function
zend_shutdown
>(defined in zend.c) does get called for NetWare from the
>php_module_shutdown function of main.c. Without this patch it leaks
huge
>memory. With this patch, the memory leaks reduce considerably.
>
>In fact, this patch is put in the zend_shutdown function itself. So,
we
>think the patch is in place unless we need to call some other
function
>to free memory.
Yes you are right. I didn't realize it's in zend_shutdown().
I don't quite understand why these leaks bother you. They happen once
per-process. It's actually faster to let the operating system nuke them
than freeing them and then exiting.
Then again, I do agree that for debugging purposes especially when
using
something like purify, it is easier and cleaner when there are no
leaks.
Andi
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php