ID: 50794 Updated by: ras...@php.net Reported By: paulsidekick at gmail dot com -Status: Open +Status: Bogus Bug Type: Performance problem Operating System: *nix PHP Version: 5.3.1 New Comment:
You can't actually compare memory_get_usage() numbers across 5.2 and 5.3. We improved the accuracy of that call in 5.3 as it missed some stuff in 5.2. Previous Comments: ------------------------------------------------------------------------ [2010-01-18 23:48:56] paulsidekick at gmail dot com Description: ------------ Upgraded to php 5.3 and memory_get_usage reports significantly higher for php scripts memory usage both using command line and apache. To rule out any issues with my code, I removed everything other than the call to memory_get_usage(); 5.2 consistently reports 70-90k while php 5.3 consistently reports 600- 700k base memory usage for this one line script. I tried this on mac os X and CENT OS/RHEL 5.3, same result. To make certain it was not something about the way they were compiled I downloaded and compiled php 5.2 and 5.3 source from scratch with no compile options to make sure I am using the defaults and get the same results across several systems. Reproduce code: --------------- <?php echo memory_get_usage(); ?> Expected result: ---------------- 70-90k (88232) like PHP 5.2 had. Actual result: -------------- 600-700k (630752) with php 5.3 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50794&edit=1