BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

pool.h File Reference

Memory Pool. More...

Go to the source code of this file.

Data Structures

struct  pj_pool_block
 
struct  pj_pool_t
 
struct  pj_pool_factory_policy
 
struct  pj_pool_factory
 
struct  pj_caching_pool
 

Macros

#define __PJ_POOL_H__
 
#define PJ_POOL_SIZE   (sizeof(struct pj_pool_t))
 
#define PJ_POOL_ALIGNMENT   4
 
#define PJ_POOL_ALLOC_T(pool, type)   ((type*)pj_pool_alloc(pool, sizeof(type)))
 
#define PJ_POOL_ZALLOC_T(pool, type)   ((type*)pj_pool_zalloc(pool, sizeof(type)))
 
#define PJ_CACHING_POOL_ARRAY_SIZE   16
 

Typedefs

typedef void pj_pool_callback (pj_pool_t *pool, pj_size_t size)
 

Functions

pj_pool_tpj_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_release (pj_pool_t *pool)
 
const char * pj_pool_getobjname (const pj_pool_t *pool)
 
void pj_pool_reset (pj_pool_t *pool)
 
pj_size_t pj_pool_get_capacity (pj_pool_t *pool)
 
pj_size_t pj_pool_get_used_size (pj_pool_t *pool)
 
void * pj_pool_alloc (pj_pool_t *pool, pj_size_t size)
 
void * pj_pool_calloc (pj_pool_t *pool, pj_size_t count, pj_size_t elem)
 
void * pj_pool_zalloc (pj_pool_t *pool, pj_size_t size)
 
void * pj_pool_alloc_from_block (pj_pool_block *block, pj_size_t size)
 
void * pj_pool_allocate_find (pj_pool_t *pool, pj_size_t size)
 
int pj_NO_MEMORY_EXCEPTION (void)
 
const pj_pool_factory_policypj_pool_factory_get_default_policy (void)
 
pj_pool_tpj_pool_create_int (pj_pool_factory *factory, const char *name, pj_size_t initial_size, pj_size_t increment_size, pj_pool_callback *callback)
 
void pj_pool_init_int (pj_pool_t *pool, const char *name, pj_size_t increment_size, pj_pool_callback *callback)
 
void pj_pool_destroy_int (pj_pool_t *pool)
 
void pj_pool_factory_dump (pj_pool_factory *pf, pj_bool_t detail)
 
void pj_caching_pool_init (pj_caching_pool *ch_pool, const pj_pool_factory_policy *policy, pj_size_t max_capacity)
 
void pj_caching_pool_destroy (pj_caching_pool *ch_pool)
 

Variables

int PJ_NO_MEMORY_EXCEPTION
 
pj_pool_factory_policy pj_pool_factory_default_policy
 

Detailed Description

Memory Pool.

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.