From 411ab3b5701824a5e2806117049952f5ad2654aa Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 1 Jun 2007 07:26:21 +0000 Subject: Implement ticket #314: Added PJ_SAFE_POOL configuration in PJLIB to track down memory corruptions git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1333 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/config.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'pjlib/include/pj/config.h') diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h index c999bb87..cbdc0aa4 100644 --- a/pjlib/include/pj/config.h +++ b/pjlib/include/pj/config.h @@ -387,6 +387,22 @@ #endif +/** + * Set this flag to non-zero to enable various checking for pool + * operations. When this flag is set, assertion must be enabled + * in the application. + * + * This will slow down pool creation and destruction and will add + * few bytes of overhead, so application would normally want to + * disable this feature on release build. + * + * Default: 0 + */ +#ifndef PJ_SAFE_POOL +# define PJ_SAFE_POOL 0 +#endif + + /** * If pool debugging is used, then each memory allocation from the pool * will call malloc(), and pool will release all memory chunks when it -- cgit v1.2.3