diff options
author | Thies C. Arntzen <thies@php.net> | 2001-05-11 18:17:08 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 2001-05-11 18:17:08 +0000 |
commit | 169febcdf0033cfdd051ffe881231dec3eec8b71 (patch) | |
tree | 3e8e821e85612e77d91e679703309bb4f3f3707e /sapi | |
parent | 8ca106bffc2ea5d7db082d3db5b7b27d800c748e (diff) | |
download | php-git-169febcdf0033cfdd051ffe881231dec3eec8b71.tar.gz |
@- Added --enable-memory-usage-info. This creates a new Apache 1.x logging
@ directive "{mod_php_memory_usage}n" which will log the peak amount of
@ memory used by the script. (Thies)
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/apache/mod_php4.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 13af96edee..54aea59e6e 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -540,7 +540,19 @@ static int send_php(request_rec *r, int display_source_mode, char *filename) static int send_parsed_php(request_rec * r) { - return send_php(r, 0, NULL); + int result = send_php(r, 0, NULL); + +#if MEMORY_USAGE_INFO + { + char mem_usage[ 32 ]; + ALS_FETCH() + + sprintf(mem_usage,"%u", (int) AG(max_allocated_memory)); + ap_table_setn(r->notes, "mod_php_memory_usage", ap_pstrdup(r->pool,mem_usage)); + } +#endif + + return result; } |