diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-07-20 08:08:30 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-07-20 08:08:30 +0000 |
commit | d24a9aee403d6540ec792d3b56a1934fbc0969d4 (patch) | |
tree | 0706522f9173a479f4f3af4e6fbf1e1cddb9ef2b /pjlib/include/pj/pool.h | |
parent | c3f4bae326d9e2dfa78d23f288e822e7ae16c2db (diff) |
Ticket #354: build PJLIB as dynamic libraries (.DSO) in Symbian
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1405 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/pool.h')
-rw-r--r-- | pjlib/include/pj/pool.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/pjlib/include/pj/pool.h b/pjlib/include/pj/pool.h index 06cdd037..5cb6aaf8 100644 --- a/pjlib/include/pj/pool.h +++ b/pjlib/include/pj/pool.h @@ -227,9 +227,9 @@ PJ_BEGIN_DECL return 1; } - // Create the pool factory, in this case, a caching pool. - pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, - 1024*1024 ); + // Create the pool factory, in this case, a caching pool, + // using default pool policy. + pj_caching_pool_init(&cp, NULL, 1024*1024 ); // Do a demo pool_demo_1(&cp.factory); @@ -505,8 +505,14 @@ PJ_INLINE(void*) pj_pool_zalloc(pj_pool_t *pool, pj_size_t size) #define PJ_POOL_ZALLOC_T(pool,type) \ ((type*)pj_pool_zalloc(pool, sizeof(type))) +/* + * Internal functions + */ +PJ_IDECL(void*) pj_pool_alloc_from_block(pj_pool_block *block, pj_size_t size); +PJ_DECL(void*) pj_pool_allocate_find(pj_pool_t *pool, unsigned size); + /** * @} // PJ_POOL */ @@ -617,8 +623,19 @@ extern int PJ_NO_MEMORY_EXCEPTION; * - block allocation and deallocation use malloc() and free(). * - callback will raise PJ_NO_MEMORY_EXCEPTION exception. * - access to pool factory is not serialized (i.e. not thread safe). + * + * @see pj_pool_factory_get_default_policy + */ +PJ_DECL_DATA(pj_pool_factory_policy) pj_pool_factory_default_policy; + + +/** + * Get the default pool factory policy. + * + * @return the pool policy. */ -extern pj_pool_factory_policy pj_pool_factory_default_policy; +PJ_DECL(const pj_pool_factory_policy*) pj_pool_factory_get_default_policy(void); + /** * This structure contains the declaration for pool factory interface. |