Memory.
| From: | Vegard Munthe | Date: | Sun, 20 Apr 2003 12:10:48 +0000 |
| Subject: | Memory. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144534@lists.php.net to get a copy of this message | ||
My questions concern memory usage, and I've seen similar questions posted
here before without anyone beeing capable of answering them. My first
question is therefore: Does anyone know where I could ask questions about
internal PHP memory usage? The internal list?
Questions:
1) Since there are no functions to tell the usage of variables and
objects, is there a way to calculate memory usage of variables and
objects?
2) When a script loads different files as includes, does it take from the
memory_limit pool of memory?
3) When leaving a function are variables in the function's scope free()'d?
I.e. is the memory used by a function completely freed for the rest of
the script?
4) Is there any way to free() memory used within a script? Does for
instance $var = ""; free the memory previously used by $var?
5) Is it not aa good idea to use objects if you plan to collect thousends
of them in PHP? Do they for some reason take up substantially more
memory than other variables?
Thank you for any answers, or help in finding the right people to ask.
-- Vego