|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-09-09 10:12 UTC] jani@php.net
[2007-09-12 10:05 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 12:00:02 2025 UTC |
Description: ------------ A simple PHP script (attached below) which executes empty Windows batch file 1000 times causes ~10 MB memory leak. Reproduce code: --------------- <?php for($i=0;$i<1000;$i++) { exec("test.bat"); } ?> //test.bat is just an empty file. Expected result: ---------------- Batch file "test.bat" should be executed 1000 times and amount of used memory should not increase when PHP script has finished. Actual result: -------------- Batch file is executed properly but PHP script causes about 10 MB memory leak. It can be observed by usage of performance system monitor. However, this amount of memory is not taken by a certain process - it simply disappears. PHP function memory_get_usage() also does not indicate the leak. Memory leak is observable only on Windows platform (tested on Windows XP). On Linux everything works OK. This problems occurs in all available enviroments : - IIS Webserver. - Apache webserver - PHP command line interpreter