PHP Possible Memory Leak
- by dropson
I have a script that loops through a database for images to convert with gd & imagick.
I unset or replace all variables and objects in between each loop.
For each loop, get_memory_usage(1) reveals a concurrent amount of memory used by that script. Which is expected.
But, when I run "top", the %MEM column reports that this script, (same PID), increments with several percentages for each loop.
I destroy all images when I'm done with them, and when I run get_defined_vars(); only the standard globals and a few variables I have is set.
Why is "top" % Memory Usage different than what PHP reports?
After 10 loops, PHP has taken 20% percetage of the system memory.
I run php 5.2.6 on Debian 5