Home --> Documentations --> PJLIB Reference
Go to the documentation of this file.
25#if PJ_HAS_POOL_ALT_API
26# include <pj/pool_alt.h>
340#define PJ_POOL_SIZE (sizeof(struct pj_pool_t))
345#ifndef PJ_POOL_ALIGNMENT
346# define PJ_POOL_ALIGNMENT 4
505#define PJ_POOL_ALLOC_T(pool,type) \
506 ((type*)pj_pool_alloc(pool, sizeof(type)))
519#define PJ_POOL_ZALLOC_T(pool,type) \
520 ((type*)pj_pool_zalloc(pool, sizeof(type)))
815#define PJ_CACHING_POOL_ARRAY_SIZE 16
911# if PJ_FUNCTIONS_ARE_INLINED
int pj_bool_t Definition: types.h:71
struct pj_lock_t pj_lock_t Definition: types.h:239
#define PJ_MAX_OBJ_NAME Definition: types.h:286
size_t pj_size_t Definition: types.h:58
void pj_caching_pool_destroy(pj_caching_pool *ch_pool)
#define PJ_CACHING_POOL_ARRAY_SIZE Definition: pool.h:815
void pj_caching_pool_init(pj_caching_pool *ch_pool, const pj_pool_factory_policy *policy, pj_size_t max_capacity)
pj_pool_t * pj_pool_create_int(pj_pool_factory *factory, const char *name, pj_size_t initial_size, pj_size_t increment_size, pj_pool_callback *callback)
int PJ_NO_MEMORY_EXCEPTION Definition: pool.h:636
pj_pool_factory_policy pj_pool_factory_default_policy Definition: pool.h:652
void pj_pool_factory_dump(pj_pool_factory *pf, pj_bool_t detail) Definition: pool.h:784
int pj_NO_MEMORY_EXCEPTION(void)
const pj_pool_factory_policy * pj_pool_factory_get_default_policy(void)
void pj_pool_destroy_int(pj_pool_t *pool)
void pj_pool_init_int(pj_pool_t *pool, const char *name, pj_size_t increment_size, pj_pool_callback *callback)
void * pj_pool_alloc(pj_pool_t *pool, pj_size_t size)
const char * pj_pool_getobjname(const pj_pool_t *pool)
void * pj_pool_alloc_from_block(pj_pool_block *block, pj_size_t size)
pj_size_t pj_pool_get_used_size(pj_pool_t *pool)
void pj_pool_secure_release(pj_pool_t **ppool)
pj_pool_t * pj_pool_create(pj_pool_factory *factory, const char *name, pj_size_t initial_size, pj_size_t increment_size, pj_pool_callback *callback)
void * pj_pool_calloc(pj_pool_t *pool, pj_size_t count, pj_size_t elem)
pj_size_t pj_pool_get_capacity(pj_pool_t *pool)
void * pj_pool_zalloc(pj_pool_t *pool, pj_size_t size) Definition: pool.h:488
void pj_pool_reset(pj_pool_t *pool)
void * pj_pool_allocate_find(pj_pool_t *pool, pj_size_t size)
void pj_pool_safe_release(pj_pool_t **ppool)
void pj_pool_callback(pj_pool_t *pool, pj_size_t size) Definition: pool.h:290
void pj_pool_release(pj_pool_t *pool)
#define PJ_BEGIN_DECL Definition: config.h:1284
#define PJ_IDECL(type) Definition: config.h:1333
#define PJ_INLINE(type) Definition: config.h:1178
#define PJ_END_DECL Definition: config.h:1285
Linked List data structure.
pj_pool_factory factory Definition: pool.h:826
pj_size_t peak_used_size Definition: pool.h:859
pj_size_t max_capacity Definition: pool.h:841
pj_size_t used_size Definition: pool.h:853
char pool_buf[256 *(sizeof(size_t)/4)] Definition: pool.h:874
pj_list used_list Definition: pool.h:869
pj_lock_t * lock Definition: pool.h:879
pj_size_t capacity Definition: pool.h:834
pj_list free_list[16] Definition: pool.h:864
pj_size_t used_count Definition: pool.h:848
unsigned char * end Definition: pool.h:301
unsigned char * buf Definition: pool.h:299
PJ_DECL_LIST_MEMBER(struct pj_pool_block)
unsigned char * cur Definition: pool.h:300
void(* block_free)(pj_pool_factory *factory, void *mem, pj_size_t size) Definition: pool.h:616
unsigned flags Definition: pool.h:626
pj_pool_callback * callback Definition: pool.h:621
void(* dump_status)(pj_pool_factory *factory, pj_bool_t detail) Definition: pool.h:716
pj_pool_factory_policy policy Definition: pool.h:671
void(* on_block_free)(pj_pool_factory *factory, pj_size_t size) Definition: pool.h:741
void(* release_pool)(pj_pool_factory *factory, pj_pool_t *pool) Definition: pool.h:709
pj_bool_t(* on_block_alloc)(pj_pool_factory *factory, pj_size_t size) Definition: pool.h:730
pj_pool_factory * factory Definition: pool.h:317
PJ_DECL_LIST_MEMBER(struct pj_pool_t)
pj_size_t capacity Definition: pool.h:323
void * factory_data Definition: pool.h:320
pj_size_t increment_size Definition: pool.h:326
char obj_name[PJ_MAX_OBJ_NAME] Definition: pool.h:314
pj_pool_callback * callback Definition: pool.h:332
pj_pool_block block_list Definition: pool.h:329
PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.
|