Bug #67725 [Asn->Csd]: PHPNG: memory leak when including files

From: Date: Tue, 05 Aug 2014 11:40:08 +0000
Subject: Bug #67725 [Asn->Csd]: PHPNG: memory leak when including files
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186980@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67725&edit=1 ID: 67725 Updated by: dmitry@php.net Reported by: pascal dot chevrel at free dot fr Summary: PHPNG: memory leak when including files -Status: Assigned +Status: Closed Type: Bug Package: *General Issues PHP Version: Irrelevant Assigned To: dmitry Block user comment: N Private report: N New Comment: Automatic comment on behalf of dmitry@zend.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=ce1af1e47bebb5ebbc2aa8f7a0b4dfb91ef8d327 Log: Fixed bug #67725 (now we create immutable arrays only in SHM) Previous Comments: ------------------------------------------------------------------------ [2014-07-31 14:03:48] nikic@php.net Looks like an issue with immutable arrays, which won't get destroyed until end of request. ------------------------------------------------------------------------ [2014-07-31 12:27:40] pascal dot chevrel at free dot fr Description: ------------ The script includes a file in a loop, the file is a big (tens of thousands of lines) php array. If you run the script in PHP 5.5 or earlier, the memory consumption at each loop iteration remains stable (about 6MB). If you run it with PHPNG, the memory consumption adds up with every iteration and me hit a memory limit quickly, it seems the memory used by the array in the include ($tmx) is not freed when it is replaced by a new $tmx array. Test script: --------------- I put a repository exposing the bug here: https://github.com/pascalchevrel/PHPNG_memory_bug ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67725&edit=1

« previous php.bugs (#186980) next »