00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_ALLOCATOR_H
00018 #define AXIS2_ALLOCATOR_H
00019
00025 #include <axis2_defines.h>
00026
00027 #ifdef __cplusplus
00028 extern "C"
00029 {
00030 #endif
00031
00045 AXIS2_DECLARE_DATA typedef struct axis2_allocator
00046 {
00047
00048
00054 void * (*malloc) (size_t size);
00061 void * (*realloc) (void *ptr, size_t size);
00066 void (*free) (void *ptr);
00067 } axis2_allocator_t;
00068
00074 AXIS2_DECLARE(axis2_allocator_t *) axis2_allocator_init (axis2_allocator_t * allocator);
00075
00076 #define AXIS2_MALLOC(allocator, size) ((allocator)->malloc(size))
00077 #define AXIS2_REALLOC(allocator, ptr, size) ((allocator)->realloc(ptr, size))
00078 #define AXIS2_FREE(allocator, ptr) ((allocator)->free(ptr))
00079
00082 #ifdef __cplusplus
00083 }
00084 #endif
00085
00086 #endif