Re: The way the engine works?

From: Date: Mon, 05 Mar 2007 23:49:56 +0000
Subject: Re: The way the engine works?
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-28257@lists.php.net to get a copy of this message
Starting to think this is more prevelant on Mac OS X. My huge numbers are coming from 5.2.0, on Mac OS X. On my Linux boxes I am getting smaller numbers, more like what you guys are reporting so I assume you are using Linux.
I vaguely remember there was some problem with calculating exact memory usage sometime ago. Not sure it's 5.2.0 but it might be. I would first verify what happens in 5.2.1.
Passing true to memory_get_usage only clouds things further as I get all 0 for memory growth on all platforms making me think that memory_get_usage() without the true param (>=5.2) is useless.
Why it's useless? 0 means your script didn't change real memory usage - but it wasn't supposed to - since PHP pre-allocated memory blocks anyway, so to change real memory usage you have to allocate something big and hold it. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/

« previous php.internals (#28257) next »