apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: apr/memory/unix apr_pools.c
Date Sun, 05 May 2002 02:06:49 GMT
brianp      02/05/04 19:06:49

  Modified:    .        CHANGES STATUS
               include  apr_pools.h
               memory/unix apr_pools.c
  Log:
  Convert apr_pcalloc to a macro to take advantage of compiler
  optimization of fixed-size memset calls
  
  Revision  Changes    Path
  1.278     +2 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.277
  retrieving revision 1.278
  diff -u -r1.277 -r1.278
  --- CHANGES	2 May 2002 19:38:17 -0000	1.277
  +++ CHANGES	5 May 2002 02:06:48 -0000	1.278
  @@ -1,5 +1,7 @@
   Changes with APR b1
   
  +  *) Converted apr_pcalloc to a macro  [Brian Pane]
  +
     *) Fixed APR_STATUS_IS_ETIMEDOUT macro.
        [Dagfinn Aarvaag <dagfinn.aarvaag@beepscience.com>]
   
  
  
  
  1.124     +1 -7      apr/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apr/STATUS,v
  retrieving revision 1.123
  retrieving revision 1.124
  diff -u -r1.123 -r1.124
  --- STATUS	3 May 2002 13:00:19 -0000	1.123
  +++ STATUS	5 May 2002 02:06:48 -0000	1.124
  @@ -1,5 +1,5 @@
   APACHE PORTABLE RUNTIME (APR) LIBRARY STATUS:			-*-text-*-
  -Last modified at [$Date: 2002/05/03 13:00:19 $]
  +Last modified at [$Date: 2002/05/05 02:06:48 $]
   
   Release:
   
  @@ -101,12 +101,6 @@
                     hubub was going on. 
                     The other alternative for non-native support is maybe to turn 
                     it into a spin lock
  -
  -    * Turn apr_pcalloc into a macro that does apr_palloc+memset, to take
  -      advantage of compiler optimizations when the size of the block being
  -      passed to memset is known at compile time.
  -
  -      +1: BrianP, Justin, Sander, Cliff, Ian, BillS
   
   
   RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
  
  
  
  1.91      +4 -0      apr/include/apr_pools.h
  
  Index: apr_pools.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_pools.h,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- apr_pools.h	22 Apr 2002 09:05:18 -0000	1.90
  +++ apr_pools.h	5 May 2002 02:06:48 -0000	1.91
  @@ -384,7 +384,11 @@
    * @param size The amount of memory to allocate
    * @return The allocated memory
    */
  +#if defined(DOXYGEN)
   APR_DECLARE(void *) apr_pcalloc(apr_pool_t *p, apr_size_t size);
  +#else
  +#define apr_pcalloc(p, size) memset(apr_palloc(p, size), 0, size)
  +#endif
   
   /**
    * Debug version of apr_pcalloc
  
  
  
  1.166     +8 -0      apr/memory/unix/apr_pools.c
  
  Index: apr_pools.c
  ===================================================================
  RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- apr_pools.c	1 Apr 2002 05:42:38 -0000	1.165
  +++ apr_pools.c	5 May 2002 02:06:49 -0000	1.166
  @@ -572,6 +572,14 @@
       return mem;
   }
   
  +/* Provide an implementation of apr_pcalloc for backward compatibility
  + * with code built before apr_pcalloc was a macro
  + */
  +
  +#ifdef apr_pcalloc
  +#undef apr_pcalloc
  +#endif
  +
   APR_DECLARE(void *) apr_pcalloc(apr_pool_t *pool, apr_size_t size)
   {
       void *mem;
  
  
  

Mime
View raw message