Hi, After looking through the new Memory Manager code, I assumed this would be the case... (and just now got to test). Since heap->size is only updated when a 256K or whatever block is *actually* allocated/freed, the number returned by memory_get_usage() will only be a multiple of that. That doesn't make it very useful anymore if one is using it to see how much memory usage differs by changing, say, number of arrays/elements/variables, strings, etc. as I was last month (small changes). And the example in the manual definitely won't work as shown.
Does anybody else think that memory_get[peak_]usage() should work more like before? I would imagine it can be "fixed" fairly easily, though it probably needs another variable, and just a little extra overhead of inc./dec. that variable more often (but I think that was done in the old MM anyway?). Thanks, Matt -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php