You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ma...@apache.org on 2008/05/20 16:07:19 UTC

svn commit: r658254 - in /webservices/axis2/trunk/c/util: include/axutil_allocator.h src/allocator.c

Author: manjula
Date: Tue May 20 07:07:18 2008
New Revision: 658254

URL: http://svn.apache.org/viewvc?rev=658254&view=rev
Log:
Adding a pool allocator pointer, ref count and function pointer.

Modified:
    webservices/axis2/trunk/c/util/include/axutil_allocator.h
    webservices/axis2/trunk/c/util/src/allocator.c

Modified: webservices/axis2/trunk/c/util/include/axutil_allocator.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_allocator.h?rev=658254&r1=658253&r2=658254&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_allocator.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_allocator.h Tue May 20 07:07:18 2008
@@ -107,6 +107,15 @@
          * set the current pool to global pool or to local pool respectively. 
          */
         void *current_pool;
+
+        void *pool_allocator;
+        int ref_pool_allocator;
+
+        void(
+            AXIS2_CALL
+            * pool_allocator_destroy)(
+                struct axutil_allocator * allocator);
+
     }
     axutil_allocator_t;
 
@@ -167,6 +176,10 @@
 #define AXIS2_FREE(allocator, ptr) \
       ((allocator)->free_fn(allocator, ptr))
 
+#define AXIS2_POOL_ALLOCATOR_DESTROY(allocator) \
+      ((allocator)->pool_allocator_destroy(allocator))  
+
+
     /** @} */
 
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/util/src/allocator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/allocator.c?rev=658254&r1=658253&r2=658254&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/allocator.c (original)
+++ webservices/axis2/trunk/c/util/src/allocator.c Tue May 20 07:07:18 2008
@@ -49,6 +49,10 @@
             allocator->malloc_fn = axutil_allocator_malloc_impl;
             allocator->realloc = axutil_allocator_realloc_impl;
             allocator->free_fn = axutil_allocator_free_impl;
+            allocator->pool_allocator_destroy = NULL;
+            allocator->pool_allocator = NULL;
+            allocator->ref_pool_allocator = 0;
+
             return allocator;
         }
     }