|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-16 00:44 UTC] felipe@php.net
-Status: Open
+Status: Bogus
[2011-11-16 00:44 UTC] felipe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Feb 10 00:00:02 2026 UTC |
Description: ------------ Sample error on system with 4+ Gbyte memory: Fatal error: Out of memory (allocated -1119879168) (tried to allocate 1048581 bytes) in /usr/local/sbin/1/!testing0.php on line 13 Why displayed memory is negative? Int is using? Test script: --------------- <?php ini_set('memory_limit', '3072M'); ini_set('display_startup_errors',1); error_reporting(2045); ini_set('display_errors',1); $a = ""; for ($i = 0; $i < 1024; ++$i) $a .= chr($i%256); $b = ""; for ($i = 0; $i < 1024; ++$i) $b .= $a; $a = array(); for ($i = 0; $i < 4096; ++$i) $a[$i] = $b.$i; ?>