#47038 [Com]: Memory leak in include()

From: Date: Tue, 20 Jan 2009 11:11:54 +0000
Subject: #47038 [Com]: Memory leak in include()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-133052@lists.php.net to get a copy of this message
ID: 47038 Comment by: tim at digicol dot de Reported By: tim at digicol dot de Status: Open Bug Type: Scripting Engine problem Operating System: Linux (Debian 4.0 x86) PHP Version: 5.3CVS-2009-01-08 (snap) Assigned To: scottmac New Comment: Happens to me with PHP 6.0.0-dev (snapshot php6.0-200901200730.tar.bz2) as well. Previous Comments: ------------------------------------------------------------------------ [2009-01-08 15:57:50] tim at digicol dot de Description: ------------ With today's PHP 5.3 snapshot, include() on my Linux box leaks memory; I've noticed this because we're using long-running scripts with the PHP CLI (where Smarty's fetch/display methods call include()...). This doesn't happen with PHP 5.2.6. I tested with an unchanged copy of php.ini-recommended and just './configure' without any options, on Debian Linux 4.0, running in VMware Fusion on my Intel Mac. Thanks for looking into this, and for the great work on PHP! Reproduce code: --------------- <?php // Create an empty file touch('empty.txt'); while (true) { include('empty.txt'); echo memory_get_usage() . "\n"; } ?> Expected result: ---------------- No increase in memory usage. Actual result: -------------- Memory usage increases constantly, until PHP exits because the memory limit is exceeded. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47038&edit=1

« previous php.bugs (#133052) next »