Re: [PHP] Memory use
http://php.net/manual/en/function.memory-get-usage.php Do it before and after, and subtract. YMMV. On Wed, March 23, 2005 10:31 pm, Joe Wollard said: Greetings, I'm trying to help a C programmer understand and use PHP for web development. So far all the similarities between C++ and PHP are making the process rather speedy. He asked what seemed like a very simple question, but I couldn't find the answer. The questions is how can you determine how much memory a variable/object/struct/etc are using? For instance: $myObject = new myClass(); $myObject-performAction_and_holdResult(); At this point, how can you tell how much memory $myObject is using? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Memory use
Greetings, I'm trying to help a C programmer understand and use PHP for web development. So far all the similarities between C++ and PHP are making the process rather speedy. He asked what seemed like a very simple question, but I couldn't find the answer. The questions is how can you determine how much memory a variable/object/struct/etc are using? For instance: $myObject = new myClass(); $myObject-performAction_and_holdResult(); At this point, how can you tell how much memory $myObject is using? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Memory Use
Hey guys, Just a quick question, which i hope someone can answer for me :) If PHP is run for a long time, such as a server, or a PHP Bot, is the memory usage of PHP likely to increase? If so, is there any way of attempting to combat this, or is it just the way that PHP is built? Cheers :) Chris Hogben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Memory Use
Hey guys, Just a quick question, which i hope someone can answer for me :) If PHP is run for a long time, such as a server, or a PHP Bot, is the memory usage of PHP likely to increase? If so, is there any way of attempting to combat this, or is it just the way that PHP is built? Cheers :) Chris Hogben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Memory Use
Hi, if you run poorly written scripts the answer is yes. else the answer is no. Chris Hogben wrote: Hey guys, Just a quick question, which i hope someone can answer for me :) If PHP is run for a long time, such as a server, or a PHP Bot, is the memory usage of PHP likely to increase? If so, is there any way of attempting to combat this, or is it just the way that PHP is built? Cheers :) Chris Hogben -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Memory use
Hi, I use Solaris 7 with Apache 1.3.14 and PHP 4.0.3pl1. I have a rather compex script that fetches historic quote data from a database and makes calculations on that. My data structures get quite big, but the script runs wel. I noticed that the amount of memory the apache process takes goes up to 60MB, and this memory stays in use vene after the script is finished. Do I need to free up the memory??? Can I do that, would it be better to run this from command line and have the process quit after it finished the job, and how do you pass arguments to a PHP script on the command line (like ?pid=6name=blah)??? -- Thierry Coopman - [EMAIL PROTECTED] My opinions are personal, and have really nothing or nothing to do with Keytrade! Democracy: Three wolves and one sheep voting on what to have for supper. -- PHP General 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]
RE: [PHP] Memory use
I had the same problem with Linux-Apache-PHP4-Informix. When PHP is loaded as a module it doesn't close the connection automaticaly, so I have to close it manualy to free the memory. Hope it helps. Marko. -Mensaje original- De: Thierry Coopman [EMAIL PROTECTED] Para: [EMAIL PROTECTED] [EMAIL PROTECTED] Fecha: Viernes, 09 de Marzo de 2001 07:53 Asunto: [PHP] Memory use Hi, I use Solaris 7 with Apache 1.3.14 and PHP 4.0.3pl1. I have a rather compex script that fetches historic quote data from a database and makes calculations on that. My data structures get quite big, but the script runs wel. I noticed that the amount of memory the apache process takes goes up to 60MB, and this memory stays in use vene after the script is finished. Do I need to free up the memory??? Can I do that, would it be better to run this from command line and have the process quit after it finished the job, and how do you pass arguments to a PHP script on the command line (like ?pid=6name=blah)??? -- Thierry Coopman - [EMAIL PROTECTED] My opinions are personal, and have really nothing or nothing to do with Keytrade! Democracy: Three wolves and one sheep voting on what to have for supper. -- PHP General 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] -- PHP General 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]