1 #ifndef ACL_ALLOCATOR_INCLUDE_H 2 #define ACL_ALLOCATOR_INCLUDE_H 8 #ifndef ACL_PREPARE_COMPILE 58 #define ACL_ALLOCATOR_CTL_END 0 59 #define ACL_ALLOCATOR_CTL_MIN_SIZE 1 60 #define ACL_ALLOCATOR_CTL_MAX_SIZE 2 91 void (*after_alloc_fn)(
void *obj,
void *pool_ctx),
92 void (*before_free_fn)(
void *obj,
void *pool_ctx),
ACL_API void * acl_allocator_membuf_realloc(const char *filename, int line, ACL_ALLOCATOR *allocator, void *oldbuf, size_t size)
struct ACL_MEM_POOL ACL_MEM_POOL
ACL_API int acl_allocator_pool_ifused(ACL_ALLOCATOR *allocator, acl_mem_type type)
HTTP_API void const char * name
ACL_API void acl_allocator_membuf_free(const char *filename, int line, ACL_ALLOCATOR *allocator, void *buf)
ACL_API void * acl_allocator_membuf_alloc(const char *filename, int line, ACL_ALLOCATOR *allocator, size_t size)
ACL_API void acl_allocator_free(ACL_ALLOCATOR *allocator)
ACL_API void acl_allocator_mem_free(const char *filename, int line, ACL_ALLOCATOR *allocator, acl_mem_type type, void *obj)
ACL_API ACL_ALLOCATOR * acl_allocator_create(size_t mem_limit)
ACL_API int acl_allocator_pool_total_allocated(ACL_ALLOCATOR *allocator)
ACL_API int acl_allocator_pool_inuse_count(ACL_ALLOCATOR *allocator, acl_mem_type type)
ACL_API void * acl_allocator_mem_alloc(const char *filename, int line, ACL_ALLOCATOR *allocator, acl_mem_type type)
ACL_API void acl_allocator_pool_remove(ACL_ALLOCATOR *allocator, ACL_MEM_POOL *pool)
ACL_API void acl_allocator_ctl(int name,...)
ACL_API void acl_allocator_config(ACL_ALLOCATOR *allocator, size_t mem_limit)
ACL_API int acl_allocator_pool_inuse_size(ACL_ALLOCATOR *allocator, acl_mem_type type)
struct ACL_ALLOCATOR ACL_ALLOCATOR
ACL_API ACL_MEM_POOL * acl_allocator_pool_add(ACL_ALLOCATOR *allocator, const char *label, size_t obj_size, acl_mem_type type, void(*after_alloc_fn)(void *obj, void *pool_ctx), void(*before_free_fn)(void *obj, void *pool_ctx), void *pool_ctx)