|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-02-10 11:04 UTC] skibi82 at interia dot pl
Description:
------------
Fatal error: Out of memory (allocated 537919488) (tried to allocate 536870913
bytes) XXXX
zend_mm_heap corrupted
The error occurs regardless of the setting memory_limit
Test script:
---------------
<?php
ini_set ('memory_limit', '4024M');
echo 'Limit:'.ini_get ('memory_limit')."\n";
$mb='';
$x=0;
do {
$x++;
$mb.='X';
}while ($x< 1048576);
echo "100\n";
$x=0;
$mb100='';
do {
$x++;
$mb100.=$mb;
}while ($x< 100);
echo "1000\n";
$x=0;
$gb='';
do {
$x++;
$gb.=$mb100;
}while ($x< 10);
echo "OK\n";
Expected result:
----------------
Limit4024M
100
1000
OK
Actual result:
--------------
Limit4024M
100
1000
PHP Fatal error: Out of memory (allocated 631504896) (tried to allocate 6291456
01 bytes) in D:\fortigate\phc-win-1\dupa.php on line 23
Fatal error: Out of memory (allocated 631504896) (tried to allocate 629145601 by
tes) in D:\fortigate\phc-win-1\dupa.php on line 23
zend_mm_heap corrupted
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
In version 5.3.8 error still occurs E:\SVN>test.php 5.3.8 Limit:4024M 100 1000 PHP Fatal error: Out of memory (allocated 736362496) (tried to allocate 734003 01 bytes) in E:\SVN\test.php on line 25 --- echo phpversion()."\n"; ini_set ('memory_limit', '4024M'); echo 'Limit:'.ini_get ('memory_limit')."\n"; $mb=''; $x=0; do { $x++; $mb.='X'; }while ($x< 1048576); echo "100\n"; $x=0; $mb100=''; do { $x++; $mb100.=$mb; }while ($x< 100); echo "1000\n"; $x=0; $gb=''; do { $x++; $gb.=$mb100; }while ($x< 10); echo "OK\n"; Fatal error: Out of memory (allocated 736362496) (tried to allocate 734003201 b tes) in E:\SVN\test.php on line 25 zend_mm_heap corrupted