ID: 9407
Updated by: andre
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Suspended
Bug Type: Performance problem
Assigned To:
Comments:
cicrular/self references are known to leak memory, not sure
if this can be improved
Previous Comments:
---------------------------------------------------------------------------
[2001-02-22 12:09:20] [EMAIL PROTECTED]
-----configure-----
"./configure"
"--with-apache=../apache_1.3.14"
"--with-mysql"
"--enable-sysvshm"
"--enable-sysvsem"
"--with-gd"
"--enable-trans-sid"
"--with-config-file-path=/etc/"
"--enable-url-includes"
"--enable-magic-quotes"
"--enable-track-vars"
"--enable-sockets"
"--with-jpeg-dir=/root/jpeg-6b/"
"--with-imap=/root/imap-2000b"
-----configure-----
maybe i should mention, that
this problem happend with every other configuration i tested (other Servers) too
-----sample-scripts-----
-----class-one-----
<?php
/**
* Class one
*/
class one
{
/**
* @var object foobar contains reference to this object
*/
var $foobar1;
/**
* @var object foobar2 contains reference to another object
*/
var $foobar2;
/**
* Constructor, putting reference of array including this object in class var $foobar
* @param object foobar reference to array including this object
*/
function one(&$foobar)
{
$this->foobar1 =& $foobar[0];
$this->foobar2 =& $foobar[1];
}
}
?>
-----class-one-----
-----class-two-----
<?php
/**
* Class one
*/
class two extends some_other_class_but_not_class_one
{
/**
* @var string foo defaults to "bar"
*/
var $foo ="bar";
/**
* Calling constructor of parent class.. nothing from intrest,
* tested this using diffrent classes, this example is just
* meant for those who say "Why dont you just extend class
* one/two to let them work together
*/
function two()
{
$this->some_other_class_but_not_class_one();
}
}
?>
-----class-two-----
-----script------
<?php
include("class.one.php");
include("class.two.php");
/* needed for some reasons, i dont think here is the problem */
session_start();
session_register($classarray);
$classarray[0] = new one($classarray);
$classarray[1] = new two;
?>
-----script------
-----sample-scripts-----
-----problem-----
Execute a set of scripts like this, uhm say 3000 times, youll notice that
your free mem will get lower and lower...
i noticed that when my mem was full... not really cool...
i think this is a problem of the garbage collection, but im not sure...
any ideas?
Peter Petermann
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9407&edit=2
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]