[2012年02月06日 00:06 UTC] developerguy2008 at yahoo dot com
Description: ------------ This affects all versions of PHP. In a script that is about to run out of memory, gc_collect_cycles() should be called as this can sometimes prevent the script from running out of memory. Example: I have a non-blocking server I wrote in PHP. If there are several thousand connections, the script will run out of memory. However, if the exact same script with the exact same load (using apache benchmark) is run while calling gc_collect_cycles() every half second, there are no out-of-memory issues. Test script: --------------- The source code for PHP will reveal that garbage collection is not run as a last ditch effort to continue execution within the memory constraints specified by the user. Expected result: ---------------- I expect PHP to run garbage collection when memory is nearly exhausted to prevent a memory error. Actual result: -------------- PHP will exhaust memory even when it is not necessary for it to exhaust memory. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012年02月06日 07:48 UTC] laruence@php.net
-Type: Bug
+Type: Feature/Change Request
[2013年11月07日 10:38 UTC] arjen at react dot com
[2014年11月04日 16:09 UTC] Danack at basereality dot com
[2015年05月15日 11:43 UTC] nikic@php.net
|