Yes, but it would be really nice if it was returned.  Systems with 128MB or
RAM run out quickly if there is a script ( like a long Phorum thread ) that
takes a good chunk.  Of course the argument can be made that the box needs
more RAM but if the memory can be returned (maybe even with a php.ini
setting that states the max amount PHP should keep) to the system why not do
it?

Brian Moon
-------------------------------------------------------------------------
Phorum Dev Team - http://phorum.org
Making better forums with PHP
-------------------------------------------------------------------------


----- Original Message -----
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: "Filip Sielimowicz" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, January 28, 2001 12:23 AM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889: Memory is not being freed.


> > It is not a leak exactly but more of a greed.  It seems to be a
> > semi-intentional but not necessary thing.  It seems that the way
Zend/PHP is
> > allocating memory is not allowing it to be returned to the system.  Once
PHP
> > has some memory it will not let it go, but it will reuse it.  So, if a
> > script takes up a good chunk of memory, it is never returned to the
system
> > unless that httpd process is killed or dies.
>
> Right, this is standard.  But this does not explain incremental memory
> usage.  Memory is marked as free and re-used.  It does not need to be
> returned to the system for it to be re-used.  So the memory usage for any
> one process should never exceed the memory usage of your most memory
> hungry script.
>
> -Rasmus
>
>


-- 
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