httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apache-1.3/src/main alloc.c
Date Fri, 20 Jun 2003 15:05:41 GMT
trawick     2003/06/20 08:05:40

  Modified:    src/main alloc.c
  Log:
  tweak a log message regarding a malloc failure to indicate
  the amount of storage that was requested
  
  Reviewed by:	Jim Jagielski, Bill Stoddard
  
  Revision  Changes    Path
  1.145     +5 -2      apache-1.3/src/main/alloc.c
  
  Index: alloc.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/alloc.c,v
  retrieving revision 1.144
  retrieving revision 1.145
  diff -u -r1.144 -r1.145
  --- alloc.c	21 Apr 2003 20:00:19 -0000	1.144
  +++ alloc.c	20 Jun 2003 15:05:40 -0000	1.145
  @@ -219,6 +219,7 @@
   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 @@
       ++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));
  
  
  

Mime
View raw message