BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

pj_pool_factory_policy Struct Reference

Data Fields

void *(* block_alloc )(pj_pool_factory *factory, pj_size_t size)
 
void(* block_free )(pj_pool_factory *factory, void *mem, pj_size_t size)
 
pj_pool_callbackcallback
 
unsigned flags
 

Detailed Description

This structure declares pool factory interface.

Field Documentation

void *(* pj_pool_factory_policy::block_alloc)(pj_pool_factory *factory, pj_size_t size)

Allocate memory block (for use by pool). This function is called by memory pool to allocate memory block.

Parameters
factoryPool factory.
sizeThe size of memory block to allocate.
Returns
Memory block.
void(* pj_pool_factory_policy::block_free)(pj_pool_factory *factory, void *mem, pj_size_t size)

Free memory block.

Parameters
factoryPool factory.
memMemory block previously allocated by block_alloc().
sizeThe size of memory block.
pj_pool_callback * pj_pool_factory_policy::callback

Default callback to be called when memory allocation fails.

unsigned pj_pool_factory_policy::flags

Option flags.


The documentation for this struct was generated from the following files:

 


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