BM>> It is not a leak exactly but more of a greed.  It seems to be a
BM>> semi-intentional but not necessary thing.  It seems that the way
BM>> Zend/PHP is allocating memory is not allowing it to be returned
BM>> to the system.  Once PHP has some memory it will not let it go,
BM>> but it will reuse it.  So, if a script takes up a good chunk of
BM>> memory, it is never returned to the system unless that httpd
BM>> process is killed or dies.

That effect was discussed to death already. Libc implementation of malloc
does not return memory to the system unless some very special conditions
are met (freed block is very large or there's enough consecutive free
space at the top of the memory). Unless PHP switches to some non-standard
malloc algoritm, it would be this way.

As for PHP not freeing some meory block - it was done for purpose, and the
purpose is - performance (I hope you don't think Zend authors have gone
through all that trouble of having their own allocs just because they
didn't think of using standard mallocs, right?). If memory size is more
important for you than performance - you are free to turn this solution
off.

-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to