PHP Memory consumption

From: Date: Wed, 03 Oct 2001 16:07:11 +0000
Subject: PHP Memory consumption
Groups: php.dev 
Request: Send a blank email to php-dev+get-67218@lists.php.net to get a copy of this message
Hello, I have a rather complex set of PHP scripts that make use of some objects and *sometime* receive a message from PHP saying it has exceeded the 8Mb memory limit. Being the code deeply structured, I believe there should be no reason for having allocated such a memory quantity, so am posing a couple of questions: 1 - is there a way to check for where *actually* is the memory allocated? Ideally I would like to know which variables holds all the memory. 2 - are there any techniques to lower the memory requirement? The impression I have (and it is only an impression, so I need (1) above) is there is some kind of memory leakage or objects/variables that aren't correctly deallocated. I make heavy use of string concatenation operator, building rather big strings in memory. Does this cause some kind of memory fragmentation problem? Is passing return values by reference actually more efficient (it avoids copying the result) or is it optimized in some way? Thanks for your help. Cris -- Cristiano Verondini http://noway.ing.unibo.it

« previous php.dev (#67218) next »