|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-28 17:30 UTC] scottmac@php.net
[2009-05-28 18:17 UTC] bmorel at ssi dot fr
[2009-05-28 21:58 UTC] scottmac@php.net
[2009-05-29 00:06 UTC] scottmac@php.net
[2009-05-29 21:39 UTC] bmorel at ssi dot fr
[2009-05-29 23:14 UTC] scottmac@php.net
[2009-05-30 11:55 UTC] bmorel at ssi dot fr
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
Description: ------------ When repeating an ereg() or eregi() on different patterns, the memory usage of httpd (or php if executed from the command-line) gets huge (about 1GB for the example below) for the time the script executes, then the memory is freed. During this time, the memory_get_usage() stays normal, and php's memory limit doesn't trigger. When repeating the ereg() with the same pattern each time, the memory usage stays normal; this happens only when repeating with a different pattern each time. Verified on CentOS with PHP 5.2.6 & 5.2.9 Verified on Windows XP with PHP 5.2.8 Reproduce code: --------------- <?php for ($i=0;$i<1000000;$i++) ereg("$i","test"); ?> Expected result: ---------------- Memory usage staying low. Actual result: -------------- Memory usage as shown by "top -d 1" gets huge.