ID: 39438 Comment by: phpbugs at thequod dot de Reported By: nikolas dot hagelstein at gmail dot com Status: Assigned Bug Type: Unknown/Other Function Operating System: NETBSD 3.0.1 AMD64 PHP Version: 5.2.0 Assigned To: dmitry New Comment:
I withdraw my previous comment, the RC3-build was without "--enable-memory-limit". Sorry. I've found that --------------------------------------- <?php $i = 0; $a = array(); while( $i++ < 100000 ) { $a[] = 'a'; } echo memory_get_usage(); ?> --------------------------------------- uses a lot more memory. I cannot say, if this is because of the more accurate memory manager reporting. I'm surprised how much memory is needed for 100.000 "a"'s in an array.. $ php -f test2.php 9494860 [EMAIL PROTECTED] [stp:2] { ~/bugs/php/memoryusage } $ php5 -f test2.php 6967216 -------- $ php -v PHP 5.2.1-dev (cli) (built: Nov 27 2006 03:16:44) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies $ php5 -v PHP 5.1.6 (cli) (built: Nov 2 2006 12:49:10) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies Previous Comments: ------------------------------------------------------------------------ [2006-11-29 15:35:50] samuel at dragonboricua dot net I started receiving this error on my WordPress blog since I upgraded to php 5.2.0 from 5.1.6, but seems that after a refresh it goes away (running on FastCGI on Apache). Sometimes it requires a few refreshes for it to go away, but it is never too constant. ------------------------------------------------------------------------ [2006-11-27 20:11:36] phpbugs at thequod dot de Just for info: I've experienced memory usage bumping since somewhere after 5.2.0RC2 and current CVS. (phpDocumentor needs more than 256M with 5.2.1-dev, but not with 5.2.0RC3-dev) ------------------------------------------------------------------------ [2006-11-27 19:28:08] lmiranda at lumigo dot net I had this problem with my forum, after some time it showed: Fatal error: Out of memory (allocated 786432) (tried to allocate 1572864 bytes) I tried to set memory_limit from 16M to 64M, and it didn't work. I've downgraded to 5.1.6 ------------------------------------------------------------------------ [2006-11-27 12:40:24] nikolas dot hagelstein at gmail dot com No workarounds atm i had to downgrade :| ------------------------------------------------------------------------ [2006-11-27 10:45:39] stig at 8620 dot dk Are there current any work arounds for this problem? My host has upgraded to 5.2.0, so I'm stuck with this problem. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39438 -- Edit this bug report at http://bugs.php.net/?id=39438&edit=1