From: Jeff Trawick Date: Fri, 20 Jun 2003 15:05:40 +0000 (+0000) Subject: tweak a log message regarding a malloc failure to indicate X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cce92d79f8a373ac406ba29efd7cd513fc69a44;p=thirdparty%2Fapache%2Fhttpd.git tweak a log message regarding a malloc failure to indicate the amount of storage that was requested Reviewed by: Jim Jagielski, Bill Stoddard git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@100316 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/main/alloc.c b/src/main/alloc.c index e73415a5c2d..f3b5627061c 100644 --- a/src/main/alloc.c +++ b/src/main/alloc.c @@ -219,6 +219,7 @@ static ap_inline void debug_verify_filled(const char *ptr, static union block_hdr *malloc_block(int size) { union block_hdr *blok; + int request_size; #ifdef ALLOC_DEBUG /* make some room at the end which we'll fill and expect to be @@ -230,9 +231,11 @@ static union block_hdr *malloc_block(int size) ++num_malloc_calls; num_malloc_bytes += size + sizeof(union block_hdr); #endif - blok = (union block_hdr *) malloc(size + sizeof(union block_hdr)); + request_size = size + sizeof(union block_hdr); + blok = (union block_hdr *) malloc(request_size); if (blok == NULL) { - fprintf(stderr, "Ouch! malloc failed in malloc_block()\n"); + fprintf(stderr, "Ouch! malloc(%d) failed in malloc_block()\n", + request_size); exit(1); } debug_fill(blok, size + sizeof(union block_hdr));