|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47022 Update of Bug 47000.
Submitted: 2009-01-06 16:32 UTC Modified: 2009-04-30 20:27 UTC
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: alan at binarystars dot com Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 5.2.8 OS: linux
Private report: No CVE-ID: None
 [2009-01-06 16:32 UTC] alan at binarystars dot com
Update of Bug 47000. I tried to update the bug report but wouldn't 
let me.

shell> php phpinfo.php | grep Configure
Configure Command =>  './configure'  '--with-mysql=/usr/local/mysql' 
'--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-mysql-
sock=/tmp/mysql.sock' '--with-imap=/root/bin/imap-2007e' '--enable-
mbstring=all' '--enable-debug'

shell> export USE_ZEND_ALLOC=0

shell> export | grep ZEND
declare -x USE_ZEND_ALLOC="0"

shell> php -v
PHP 5.2.8 (cli) (built: Dec 20 2008 05:26:51)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

shell> uname -r

shell> valgrind --tool=memcheck --num-callers=30 --leak-check=full --
log-file=imap_bug.log /usr/local/bin/php imap_bug.php

Old test run:

Reproduce code:
Colorized imap_bug.html with line numbers: (34k)

Text version: (3.6k)

Expected result:
See Bug 47000.

Actual result:
Method 1 results (w/ USE_ZEND_ALLOC=0): (2.1k)

Method 2 results (w/ USE_ZEND_ALLOC=0): (2.1k)

Valgrind results (v3.4.0): (2.4k)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-06 17:55 UTC]
Check memory_get_usage() to see what PHP is using, my guess is that there is a copy of the data in c-client and another for PHP. Immediately after that line has executed I'm assuming the c-client version is released.
 [2009-01-06 18:57 UTC] alan at binarystars dot com
I assume you mean if I enable Zend Memory. If you check the Old test 
run where USE_ZEND_ALLOC=1 you can see PHP is cleared the memory 
successfully after an unset.

However, the resident memory (RSS) remains high. Its almost like c-
client keeps the email data in memory without flushing the memory.

Again, this is a huge problem with systems that do not have a lot of 
free memory. Is there any way to flush the memory without exiting the 
 [2009-01-06 18:59 UTC] alan at binarystars dot com
I'll try posting the URL again... the 't' is missing at the end of 
the line.
 [2009-01-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-04-30 20:27 UTC]
Duplicate of #47940, which is now fixed in cvs (all active branches).
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Oct 02 16:01:26 2023 UTC