*/
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;