summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sapi/apache/mod_php4.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index bb4b2a30b4..3a248c0ebb 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -587,18 +587,17 @@ static int send_php(request_rec *r, int display_source_mode, char *filename)
*/
static int send_parsed_php(request_rec * r)
{
- int result = send_php(r, 0, NULL);
+ int result = send_php(r, 0, NULL);
#if MEMORY_LIMIT
- {
- char mem_usage[ 32 ];
- TSRMLS_FETCH();
+ {
+ char *mem_usage;
+ TSRMLS_FETCH();
- sprintf(mem_usage,"%u", (int) AG(allocated_memory_peak));
- AG(allocated_memory_peak)=0;
- ap_table_setn(r->notes, "mod_php_memory_usage", ap_pstrdup(r->pool, mem_usage));
-
- }
+ mem_usage = ap_psprintf(r->pool, "%u", AG(allocated_memory_peak));
+ AG(allocated_memory_peak) = 0;
+ ap_table_setn(r->notes, "mod_php_memory_usage", mem_usage);
+ }
#endif
return result;