Hi Dmitry, Thanks for the reply. :-)
To the others mentioning the overhead and "slowness" of keeping track of the memory size, I can't believe that, relative to ALL the other work being done in emalloc()? I was going to try a loop of emalloc() and efree() with and without memory-limit just to see what the difference is. And it would be much less of course %-wise in overall script execution. Don't have time right now... If keeping track of mem usage was such a performance hit, 1) people that care about performance shouldn't use memory-limit, and 2) when Dmitry added *another* variable which gets updated more often, it hurt the performance a lot. I doubt it. :-) Regarding your questions Dmitry, I'll share the thoughts of an outsider (but also a user!) if they matter. *) I do think memory_get_[peak_]usage() should always be available *) I don't know that the --enable-memory-limit option should be removed *) I would like the "real_usage" param to always work the same and think it should. The way you propose, what about the Windows binary downloads? Wouldn't be able to see small changes in memory usage. :-( Thanks, Matt ----- Original Message ----- From: "Dmitry Stogov" Sent: Thursday, July 27, 2006 Now, functions memory_get_[peak_]usage() and memory_limit checking can be enabled/disabled using "--enable-memory-limit" configure option. However cost of meory_limit checking is significant less with new memory manager. I think now we can remove "--enable-memory-limit" option and make it always enabled. Functions memory_get_[peak_]usage() will be always enabled and will always report proper values for "real" memory usage. The tracking of "emalloced" memory usage will be enabled only in DEBUG build. So in RELEASE memory_get_[peak_]usage() and memory_get_[peak_]usage(false) will always return FALSE (or 0), and memory_get_[peak_]usage(true) will return "real" memory usage. In DEBUG build memory_get_[peak_]usage() and memory_get_[peak_]usage(false) will return "emalloced" memory, and memory_get_[peak_]usage(true) will return "real" memory usage. What do you think? Dmitry. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php