httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@hyperreal.org
Subject cvs commit: apache-2.0/src/lib/apr/lib apr_pools.c
Date Fri, 29 Oct 1999 21:52:33 GMT
manoj       99/10/29 14:52:33

  Modified:    src/lib/apr/lib apr_pools.c
  Log:
  Make -DALLOC_USE_MALLOC work for APR's pools.
  
  Revision  Changes    Path
  1.20      +5 -1      apache-2.0/src/lib/apr/lib/apr_pools.c
  
  Index: apr_pools.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_pools.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -d -u -r1.19 -r1.20
  --- apr_pools.c	1999/10/13 17:45:16	1.19
  +++ apr_pools.c	1999/10/29 21:52:32	1.20
  @@ -765,11 +765,15 @@
   API_EXPORT(void *) ap_palloc(struct context_t *c, int reqsize)
   {
   #ifdef ALLOC_USE_MALLOC
  -    ap_pool_t *a = c->pool;
  +    ap_pool_t *a;
       int size = reqsize + CLICK_SZ;
       void *ptr;
   
       ap_block_alarms();
  +    if (c == NULL) {
  +        return malloc(reqsize);
  +    }
  +    a = c->pool;
       ptr = malloc(size);
       if (ptr == NULL) {
   	fputs("Ouch!  Out of memory!\n", stderr);
  
  
  

Mime
View raw message