ON Linux I have kcacheGrind setup with Xdebug and I find it is a nice
little thing to have. It won't tell you the memory consumed but it will
find cycles and display object maps. if you have Kcachegrind it is
likely you have valgrind installed.
Larry Garfield wrote:
Hi folks. I have a complicated PHP app that is eating up more memory than I
think it should. I have a couple of theories as to where it could be going,
but I need some way to verify it.
There are a number of large data structures (mostly arrays) that get built up
throughout the course of the request. What I'd like to be able to do is at
certain points check to see how much memory those data structures are using.
Because they're not all built at once, the usual "check memory before, build,
check after" routine won't work. Plus, that gets screwed up by PHP's use of
copy-on-write at times.
I know that it would result in essentially over-reporting, but I would ideally
like to be able to ignore the copy-on-write issue and say "if this variable
were the only thing in memory (and its dependents, of course, for a nested
array), what would its memory usage be? I just have no idea how to do that.
Anyone have a suggestion for how to accomplish that?
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php