WARNING: The online documentation has moved to https://docs.pjsip.org.
Visit the new documentation at https://docs.pjsip.org:
Detailed DescriptionA pool object must be created through a factory. A factory not only provides generic interface functions to create and release pool, but also provides strategy to manage the life time of pools. One sample implementation, pj_caching_pool, can be set to keep the pools released by application for future use as long as the total memory is below the limit. // PJ_POOL The pool factory interface declared in PJLIB is designed to be extensible. Application can define its own strategy by creating it's own pool factory implementation, and this strategy can be used even by existing library without recompilation. Pool Factory InterfaceThe pool factory defines the following interface:
Pool Factory Policy.A pool factory only defines functions to create and release pool and how to manage pools, but the rest of the functionalities are controlled by policy. A pool policy defines:
A pool factory can be given different policy during creation to make it behave differently. For example, caching pool factory can be configured to allocate and deallocate from a static/contiguous/preallocated memory instead of using malloc()/free(). What strategy/factory and what policy to use is not defined by PJLIB, but instead is left to application to make use whichever is most efficient for itself. The pool factory policy controls the behaviour of memory factories, and defines the following interface:
Function Documentation
Get PJ_NO_MEMORY_EXCEPTION constant.
This function is intended to be used by pool factory implementors.
This function is intended to be used by pool factory implementors.
Dump pool factory state.
Get the default pool factory policy.
This function is intended to be used by pool factory implementors.
Variable DocumentationThis constant denotes the exception number that will be thrown by default memory factory policy when memory allocation fails. This global variable points to default memory pool factory policy. The behaviour of the default policy is:
Copyright (C) 2006-2009 Teluu Inc. |