Memory eating
| From: | Faisal Nasim | Date: | Sun, 09 Apr 2000 05:03:50 +0000 |
| Subject: | Memory eating | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17755@lists.php.net to get a copy of this message | ||
Hi,
Did a sample test in both Perl and PHP, they both eat
alot of memory:
PHP:
<?
$fas1=1;
echo $fas1;
unset($fas1);
$fas2=2;
echo $fas2;
unset($fas2);
$fas3=3;
echo $fas3;
unset($fas3);
.
.
.
to $fas20000 ......
?>
Perl:
$fas1=1;
print $fas1;
undef $fas1;
.
.
.
to $fas20000
PHP's maximum consumption goes to 12mb and Perl goes
upto 23mb (same result 4 times). But it should not take more
than 2-3mb (okay not more than 5mb, assuming it loads the
modules and stuff at the startup). In both PHP and Perl, the
memory increases as it finds more variables, but we are
undef()ing and unset()ting them too, aren't they (cleaned
completely|freed for good)? Any ideas?
Platform: Windows.
Note: Tried to try the same thing with Python, works for
10 seconds; memory level rises slowly to 13mb, and then
boom - it crashes. Python script:
fas1=1;
print fas1;
del fas1;
.
.
.
to fas20000
Thanks.
Faisal