Re: memory_get_usage with new Memory Manager

From: Date: Thu, 27 Jul 2006 13:03:52 +0000
Subject: Re: memory_get_usage with new Memory Manager
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-25004@lists.php.net to get a copy of this message
Ilia Alshanetsky wrote:
On 27-Jul-06, at 6:02 AM, Matt W wrote:
Something else I'd like to see changed... Does anyone think memory_get_[peak_]usage() should *always* be available, regardless of whether memory_limit is actually enabled? Using the Windows binaries at least, I was devastated :-D that they were unavailable for experimenting, etc.
Counting memory all the time adds a fair amount of overhead to script execution especially given how frequently PHP needs to allocate memory. Therefore usage memory utilization functions are only available when PHP is compiled with memory in which case it keeps track of its mem usage.
That may hear off topic , but how you enable something else than 8M *without* getting this counting overhead ? It looks to me that --enable-memory-limit mixes 2 independant roles : - setting the amount of available memory, and enabling eventually local setting, - enabling the evaluation of the process consumption. I would like to be wrong on this :) -- toggg

« previous php.internals (#25004) next »