apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stri...@apache.org
Subject cvs commit: apr/memory/unix apr_pools.c
Date Thu, 30 May 2002 01:06:42 GMT
striker     02/05/29 18:06:42

  Modified:    include  apr_pools.h
               memory/unix apr_pools.c
  Log:
  New function: apr_pool_allocator_get.  This function allows us to
  find out which allocator is being used by a pool.  This is particularly
  usefull when you have created a pool with its own allocator, but
  don't want to keep a global pointer around to do tricks with its
  max free size or its mutexes.
  
  Revision  Changes    Path
  1.95      +6 -0      apr/include/apr_pools.h
  
  Index: apr_pools.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_pools.h,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- apr_pools.h	30 May 2002 00:20:56 -0000	1.94
  +++ apr_pools.h	30 May 2002 01:06:42 -0000	1.95
  @@ -290,6 +290,12 @@
   #endif
   
   /**
  + * Find the pools allocator
  + * @param pool The pool to get the allocator from.
  + */
  +APR_DECLARE(apr_allocator_t *) apr_pool_allocator_get(apr_pool_t *pool);
  +
  +/**
    * Clear all memory in the pool and run all the cleanups. This also destroys all
    * subpools.
    * @param p The pool to clear
  
  
  
  1.174     +5 -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.173
  retrieving revision 1.174
  diff -u -r1.173 -r1.174
  --- apr_pools.c	30 May 2002 00:54:55 -0000	1.173
  +++ apr_pools.c	30 May 2002 01:06:42 -0000	1.174
  @@ -873,6 +873,11 @@
       return APR_SUCCESS;
   }
   
  +APR_DECLARE(apr_allocator_t *) apr_pool_allocator_get(apr_pool_t *pool)
  +{
  +    return pool->allocator;
  +}
  +
   
   /*
    * "Print" functions
  
  
  

Mime
View raw message