From 96d3d172ea96f35bd5b08fd3de4a0f1c9d1685a3 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Sat, 20 Aug 2016 15:50:22 +0000 Subject: [PATCH] Delay some memory allocation in order to save 272 bytes in the 'request' memory pool if mod_status handler is triggered and is not able to handle the request git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757010 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 005bf046f2..647c930ae2 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -195,7 +195,7 @@ static int status_handler(request_rec *r) long req_time; int short_report; int no_table_report; - worker_score *ws_record = apr_palloc(r->pool, sizeof *ws_record); + worker_score *ws_record; process_score *ps_record; char *stat_buffer; pid_t *pid_buffer, worker_pid; @@ -293,6 +293,8 @@ static int status_handler(request_rec *r) } } + ws_record = apr_palloc(r->pool, sizeof *ws_record); + for (i = 0; i < server_limit; ++i) { #ifdef HAVE_TIMES clock_t proc_tu = 0, proc_ts = 0, proc_tcu = 0, proc_tcs = 0; -- 2.50.1