]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
tweak a log message regarding a malloc failure to indicate
authorJeff Trawick <trawick@apache.org>
Fri, 20 Jun 2003 15:05:40 +0000 (15:05 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 20 Jun 2003 15:05:40 +0000 (15:05 +0000)
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

src/main/alloc.c

index e73415a5c2d3d5ba8a4ff2b298ee96575af32ad5..f3b5627061c2376f4e67392fb3e5daa10649d072 100644 (file)
@@ -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));