iliaa Tue May 30 14:51:21 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard var.c php_var.h basic_functions.c /php-src NEWS Log: Added memory_get_peak_usage() function for retrieving peak memory usage of a PHP script. http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/var.c?r1=1.203.2.7&r2=1.203.2.7.2.1&diff_format=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.203.2.7 php-src/ext/standard/var.c:1.203.2.7.2.1 --- php-src/ext/standard/var.c:1.203.2.7 Wed Apr 5 02:28:06 2006 +++ php-src/ext/standard/var.c Tue May 30 14:51:20 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.203.2.7 2006/04/05 02:28:06 iliaa Exp $ */ +/* $Id: var.c,v 1.203.2.7.2.1 2006/05/30 14:51:20 iliaa Exp $ */ @@ -918,6 +918,12 @@ RETURN_LONG(AG(allocated_memory)); } /* }}} */ +/* {{{ proto int memory_get_peak_usage() + Returns the peak allocated by PHP memory */ +PHP_FUNCTION(memory_get_peak_usage) { + RETURN_LONG(AG(allocated_memory_peak)); +} +/* }}} */ #endif /* http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/php_var.h?r1=1.30.2.1&r2=1.30.2.1.2.1&diff_format=u Index: php-src/ext/standard/php_var.h diff -u php-src/ext/standard/php_var.h:1.30.2.1 php-src/ext/standard/php_var.h:1.30.2.1.2.1 --- php-src/ext/standard/php_var.h:1.30.2.1 Sun Jan 1 12:50:15 2006 +++ php-src/ext/standard/php_var.h Tue May 30 14:51:20 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_var.h,v 1.30.2.1 2006/01/01 12:50:15 sniper Exp $ */ +/* $Id: php_var.h,v 1.30.2.1.2.1 2006/05/30 14:51:20 iliaa Exp $ */ #ifndef PHP_VAR_H #define PHP_VAR_H @@ -30,6 +30,7 @@ PHP_FUNCTION(unserialize); #if MEMORY_LIMIT PHP_FUNCTION(memory_get_usage); +PHP_FUNCTION(memory_get_peak_usage); #endif PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.4&r2=1.725.2.31.2.5&diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.4 php-src/ext/standard/basic_functions.c:1.725.2.31.2.5 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.4 Wed May 24 23:14:08 2006 +++ php-src/ext/standard/basic_functions.c Tue May 30 14:51:20 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.4 2006/05/24 23:14:08 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.5 2006/05/30 14:51:20 iliaa Exp $ */ #include "php.h" #include "php_streams.h" @@ -466,6 +466,7 @@ PHP_FE(print_r, NULL) #if MEMORY_LIMIT PHP_FE(memory_get_usage, NULL) + PHP_FE(memory_get_peak_usage, NULL) #endif PHP_FE(register_shutdown_function, NULL) http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.64&r2=1.2027.2.547.2.65&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.64 php-src/NEWS:1.2027.2.547.2.65 --- php-src/NEWS:1.2027.2.547.2.64 Tue May 30 13:12:21 2006 +++ php-src/NEWS Tue May 30 14:51:20 2006 @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2006, PHP 5.2.0 +- Added memory_get_peak_usage() function for retrieving peak memory usage of + a PHP script. (Ilia) - Changed Apache 2 Handler SAPI to call ap_set_content_type() once only. (Mike) - Changed E_ALL error reporting mode to includes E_RECOVERABLE_ERROR. (Marcus) - Added control character checks for cURL extension's open_basedir/safe_mode
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php