Edit report at https://bugs.php.net/bug.php?id=60062&edit=1
ID: 60062 Updated by: [email protected] Reported by: septerrianin at mail dot ru Summary: Negative memory (allocated -1119879168) -Status: Open +Status: Bogus Type: Bug Package: *General Issues Operating System: Debian GNU/Linux PHP Version: 5.3.8 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Currently it's a long type. Previous Comments: ------------------------------------------------------------------------ [2011-10-14 12:02:08] septerrianin at mail dot ru 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; ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60062&edit=1
