diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-12-30 23:45:18 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-12-30 23:45:18 +0000 |
commit | 6f6bc82de797537f6d8b1db96497dd3d7d556f9a (patch) | |
tree | feb8272c8d721370f9250d07b5973b850fc9cfbd /sapi/apache2filter | |
parent | bfea989d21fdd26816ffdb365992ec339163b4c4 (diff) | |
download | php-git-6f6bc82de797537f6d8b1db96497dd3d7d556f9a.tar.gz |
Fixed bug #21045 (Apache 2 SAPI now supports the mod_php_memory_usage
log variable that allows users to log the memory usage of their PHP scripts).
Diffstat (limited to 'sapi/apache2filter')
-rw-r--r-- | sapi/apache2filter/sapi_apache2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index a999369df5..48221cd46a 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -498,6 +498,15 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) zfd.opened_path = NULL; php_execute_script(&zfd TSRMLS_CC); +#ifdef MEMORY_LIMIT + { + char *mem_usage; + + mem_usage = apr_psprintf(ctx->r->pool, "%u", AG(allocated_memory_peak)); + AG(allocated_memory_peak) = 0; + apr_table_set(ctx->r->notes, "mod_php_memory_usage", mem_usage); + } +#endif } else { zend_syntax_highlighter_ini syntax_highlighter_ini; |