BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

pj_pool_factory_policy Struct Reference
[Pool Factory and Policy]

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

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

Parameters:
factory Pool factory.
size The 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:
factory Pool factory.
mem Memory block previously allocated by block_alloc().
size The size of memory block.

Default callback to be called when memory allocation fails.

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.