summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/config.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-03-30 15:56:01 +0000
committerBenny Prijono <bennylp@teluu.com>2006-03-30 15:56:01 +0000
commit3cf609b42e573adf8e7183070176a450a7b4959e (patch)
tree3a34159d7b023de27b99675520ab8f82e4245027 /pjlib/include/pj/config.h
parente985f59aabf893535e0d12c5867e44d69ccb83fe (diff)
Added ability to have custom pool backend (needed for pool debugging facility)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@364 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/config.h')
-rw-r--r--pjlib/include/pj/config.h53
1 files changed, 52 insertions, 1 deletions
diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h
index 896cfd5b..cd95dbcd 100644
--- a/pjlib/include/pj/config.h
+++ b/pjlib/include/pj/config.h
@@ -208,8 +208,12 @@
# define PJ_TERM_HAS_COLOR 1
#endif
+
/**
- * Pool debugging.
+ * If pool debugging is used, then each memory allocation from the pool
+ * will call malloc(), and pool will release all memory chunks when it
+ * is destroyed. This works better when memory verification programs
+ * such as Rational Purify is used.
*
* Default: 0
*/
@@ -217,6 +221,17 @@
# define PJ_POOL_DEBUG 0
#endif
+
+/**
+ * Do we have alternate pool implementation?
+ *
+ * Default: 0
+ */
+#ifndef PJ_HAS_POOL_ALT_API
+# define PJ_HAS_POOL_ALT_API PJ_POOL_DEBUG
+#endif
+
+
/**
* \def PJ_HAS_TCP
* Support TCP in the library.
@@ -261,6 +276,42 @@
# endif
#endif
+
+/**
+ * If PJ_IOQUEUE_HAS_SAFE_UNREG macro is defined, then ioqueue will do more
+ * things to ensure thread safety of handle unregistration operation by
+ * employing reference counter to each handle.
+ *
+ * In addition, the ioqueue will preallocate memory for the handles,
+ * according to the maximum number of handles that is specified during
+ * ioqueue creation.
+ *
+ * All applications would normally want this enabled, but you may disable
+ * this if:
+ * - there is no dynamic unregistration to all ioqueues.
+ * - there is no threading, or there is no preemptive multitasking.
+ *
+ * Default: 1
+ */
+#ifndef PJ_IOQUEUE_HAS_SAFE_UNREG
+# define PJ_IOQUEUE_HAS_SAFE_UNREG 1
+#endif
+
+
+/**
+ * When safe unregistration (PJ_IOQUEUE_HAS_SAFE_UNREG) is configured in
+ * ioqueue, the PJ_IOQUEUE_KEY_FREE_DELAY macro specifies how long the
+ * ioqueue key is kept in closing state before it can be reused.
+ *
+ * The value is in miliseconds.
+ *
+ * Default: 500 msec.
+ */
+#ifndef PJ_IOQUEUE_KEY_FREE_DELAY
+# define PJ_IOQUEUE_KEY_FREE_DELAY 500
+#endif
+
+
/**
* Overrides FD_SETSIZE so it is consistent throughout the library.
* OS specific configuration header (compat/os_*) might have declared