From: iv dot zhekov at gmail dot com Operating system: Windows XP PHP version: 5.2.9RC2 PHP Bug Type: Semaphore related Bug description: Memory leak using shmop_open
Description: ------------ Function shmop_open increases memory used by Apache with about 4KB every time it is invoked, and doesn't free it. It looks like memory allocated for php_shmop struct is not freed. Reproduce code: --------------- <? $shmid = shmop_open(0xff2, "c", 0644, 8); shmop_close($shmid); ?> Expected result: ---------------- Memory used by apache should be increased only once, when shared memory segment is created. Refreshing the page should not increase used memory or it must free it when script ends. Actual result: -------------- Every time the script is executed additional 4KB are added to the memory used by Apache. -- Edit bug report at http://bugs.php.net/?id=47429&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47429&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47429&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47429&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47429&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47429&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47429&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47429&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47429&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47429&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47429&r=support Expected behavior: http://bugs.php.net/fix.php?id=47429&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47429&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47429&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47429&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47429&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47429&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47429&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47429&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47429&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47429&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47429&r=mysqlcfg