acl/lib_acl/include/stdlib/acl_dbuf_pool.h
zsxxsz cc05b877a2 first commit acl to github
first commit acl to github
2013-08-18 17:42:25 +08:00

27 lines
756 B
C

#ifndef __ACL_DBUF_POOL_INCLUDE_H__
#define __ACL_DBUF_POOL_INCLUDE_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ACL_DBUF_POOL ACL_DBUF_POOL;
/* public */
ACL_API ACL_DBUF_POOL *acl_dbuf_pool_create(int block_size);
ACL_API void acl_dbuf_pool_destroy(ACL_DBUF_POOL *pool);
ACL_API void acl_dbuf_pool_free(ACL_DBUF_POOL *pool, void *ptr, int length);
ACL_API void *acl_dbuf_pool_alloc(ACL_DBUF_POOL *pool, int length);
ACL_API void *acl_dbuf_pool_calloc(ACL_DBUF_POOL *pool, int length);
ACL_API void *acl_dbuf_pool_memdup(ACL_DBUF_POOL *pool, const void *s, size_t len);
ACL_API char *acl_dbuf_pool_strdup(ACL_DBUF_POOL *pool, const char *s);
/* private */
ACL_API void acl_dbuf_pool_test(size_t max);
#ifdef __cplusplus
}
#endif
#endif