Am i then also correct to assume that the output of
memory_get_peak_usage is used for determining the memory_limit?

Also: after correcting with your new information (zval = 114 bytes
instead of 68) I still have a rather large offset:

    640952+2165950+114+(276697*114)+(276697*3*114)+2165950 = 131146798 =
125M

(not trying to be picky here; I just don't understand)

_If_ my calculations are correct then a zval should be approx 216 bytes
(excluding string contents):

    ((244000000-640952-2165950-2165950) / 4) / 276697 = 215.9647B

Mike

On Tue, 2011-06-07 at 19:50 +0200, David Zülke wrote:
> memory_get_peak_usage() is the maximum amount of memory used by the VM of PHP 
> (but not by some extensions for instance) up until the point where that 
> function is called. So the actual memory usage may be even higher IIRC. But 
> yeah, you're basically right. I've explained in another message why it might 
> be so much more than you expected (zval overhead, basically)
> 
> David



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to