Memory.
| From: | Vegard Munthe | Date: | Mon, 21 Apr 2003 10:49:03 +0000 |
| Subject: | Memory. | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-989@lists.php.net to get a copy of this message | ||
I've asked these questions a number of other places. It seems no-one
really knows. So, even if this might not be the right list for these
questions, I hope someone can bare with me and help answer a few
questions, or direct me to someone or some doc that can.
Questions:
1) Since there are no functions to tell the memory 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
freed? I.e. is the memory used by a function completely freed for
the rest of the script to reuse?
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