Subject: | Memory Leak for each Interpreter Instance |
Hi,
It would appear the interpreter leaks memory for each instance created, using this script shows growing memory usage:
#!/usr/bin/perl
use strict;
use warnings;
use PHP::Interpreter;
for (my $i = 0; $i < 100000; $i++) {
my $foo;
my $p = PHP::Interpreter->new({OUTPUT => \$foo});
$p->include("test.php");
undef $p;
undef $foo;
}
All that the "test.php" file includes is this:
"This is just a test php file."
I'm using this as my php:
$ php -v
PHP 5.1.0RC1 (cli) (built: Aug 20 2005 14:36:33)
Copyright (c) 1997-2005 The PHP Group
Zend Engine v2.1.0-dev, Copyright (c) 1998-2005 Zend Technologies
$ perl -v
This is perl, v5.8.7 built for i686-linux
$ uname -a
Linux synthesis 2.6.11-1.14_FC3 #1 Thu Apr 7 19:23:49 EDT 2005 i686 i686 i386 GNU/Linux
Is there an easy way to fix this leak?
Thanks,
Rusty