summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2001-05-11 18:17:08 +0000
committerThies C. Arntzen <thies@php.net>2001-05-11 18:17:08 +0000
commit169febcdf0033cfdd051ffe881231dec3eec8b71 (patch)
tree3e8e821e85612e77d91e679703309bb4f3f3707e /sapi
parent8ca106bffc2ea5d7db082d3db5b7b27d800c748e (diff)
downloadphp-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.c14
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;
}