[PHP] Memory used by script

2003-09-06 Thread \[cz\]Emo
Hi all.

I would like to ask you if exist some way to get size of memory used by
current script.
I searched for sth, but didn't found any suitable result :o(

Thanx
Emo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Memory used by script

2003-09-06 Thread Curt Zirzow
* Thus wrote [cz]Emo ([EMAIL PROTECTED]):
 Hi all.
 
 I would like to ask you if exist some way to get size of memory used by
 current script.
 I searched for sth, but didn't found any suitable result :o(

yes for php = 4.3.2

http://php.net/memory_get_usage


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Memory used by script...

2003-02-21 Thread news.php.net
Hi... I got a big site, which is not very well constructed inside, and the
script began to throw (rather often, but NOT always) a fatal error  Fatal
error: Allowed memory size of 8388608 bytes exhausted , every time in
different places. I wonder how should I debug that, as there is pretty much
code inside, and I hardly got aqcuainted with it in a whole.

SO THE QUESTION: Are there any functions or smth., to check, how much memory
is used at some particular moment of execution of the script??? If I could
state, that for example after some class instantiaton memory usage greatly
increases, I would be able to localise the problem.

Thanks much,
Mark.
Do not hesitate to send Your reply's also on [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Memory used by script...

2003-02-21 Thread John W. Holmes
 Hi... I got a big site, which is not very well constructed inside, and
the
 script began to throw (rather often, but NOT always) a fatal error 
Fatal
 error: Allowed memory size of 8388608 bytes exhausted , every time in
 different places. I wonder how should I debug that, as there is pretty
 much
 code inside, and I hardly got aqcuainted with it in a whole.
 
 SO THE QUESTION: Are there any functions or smth., to check, how much
 memory
 is used at some particular moment of execution of the script??? If I
could
 state, that for example after some class instantiaton memory usage
greatly
 increases, I would be able to localise the problem.

I remember asking about this a while ago. There were no answers. I don't
think there's any way for PHP to monitor it. Some web servers will store
the total amount of memory your script took up. So if you parse those
logs you may get the info you need. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php