Index: /pjproject/trunk/pjsip/include/pjsip/sip_config.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip/sip_config.h	(revision 2130)
+++ /pjproject/trunk/pjsip/include/pjsip/sip_config.h	(revision 2131)
@@ -158,16 +158,22 @@
 /**
  * Specify maximum transaction count in transaction hash table.
- * Default value is 16*1024
+ * For efficiency, the value should be 2^n-1 since it will be
+ * rounded up to 2^n.
+ *
+ * Default value is 1023
  */
 #ifndef PJSIP_MAX_TSX_COUNT
-#   define PJSIP_MAX_TSX_COUNT		(16*1024)
+#   define PJSIP_MAX_TSX_COUNT		(1024-1)
 #endif
 
 /**
  * Specify maximum number of dialogs in the dialog hash table.
- * Default value is 16*1024.
+ * For efficiency, the value should be 2^n-1 since it will be
+ * rounded up to 2^n.
+ *
+ * Default value is 511.
  */
 #ifndef PJSIP_MAX_DIALOG_COUNT
-#   define PJSIP_MAX_DIALOG_COUNT	(16*1024)
+#   define PJSIP_MAX_DIALOG_COUNT	(512-1)
 #endif
 
@@ -554,5 +560,5 @@
  */
 #ifndef PJSIP_POOL_LEN_UA
-#   define PJSIP_POOL_LEN_UA		4000
+#   define PJSIP_POOL_LEN_UA		512
 #endif
 
@@ -561,5 +567,5 @@
  */
 #ifndef PJSIP_POOL_INC_UA
-#   define PJSIP_POOL_INC_UA		4000
+#   define PJSIP_POOL_INC_UA		512
 #endif
 
@@ -572,15 +578,21 @@
 
 /**
- * Initial memory size for transaction layer
+ * Initial memory size for transaction layer. The bulk of pool usage
+ * for transaction layer will be used to create the hash table, so 
+ * setting this value too high will not help too much with reducing
+ * fragmentation and the memory will most likely be wasted.
  */
 #ifndef PJSIP_POOL_TSX_LAYER_LEN
-#   define PJSIP_POOL_TSX_LAYER_LEN	4000
-#endif
-
-/**
- * Memory increment for transaction layer.
+#   define PJSIP_POOL_TSX_LAYER_LEN	512
+#endif
+
+/**
+ * Memory increment for transaction layer. The bulk of pool usage
+ * for transaction layer will be used to create the hash table, so 
+ * setting this value too high will not help too much with reducing
+ * fragmentation and the memory will most likely be wasted.
  */
 #ifndef PJSIP_POOL_TSX_LAYER_INC
-#   define PJSIP_POOL_TSX_LAYER_INC	4000
+#   define PJSIP_POOL_TSX_LAYER_INC	512
 #endif
 
Index: /pjproject/trunk/pjsip/src/pjsip-simple/evsub.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip-simple/evsub.c	(revision 2130)
+++ /pjproject/trunk/pjsip/src/pjsip-simple/evsub.c	(revision 2131)
@@ -297,5 +297,5 @@
 
     /* Create pool: */
-    mod_evsub.pool = pjsip_endpt_create_pool(endpt, "evsub", 4000, 4000);
+    mod_evsub.pool = pjsip_endpt_create_pool(endpt, "evsub", 512, 512);
     if (!mod_evsub.pool)
 	return PJ_ENOMEM;
Index: /pjproject/trunk/pjsip/src/pjsip-simple/publishc.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip-simple/publishc.c	(revision 2130)
+++ /pjproject/trunk/pjsip/src/pjsip-simple/publishc.c	(revision 2131)
@@ -120,4 +120,5 @@
 				       1, &pjsip_publish_method.name);
      */
+    PJ_UNUSED_ARG(endpt);
     return PJ_SUCCESS;
 }
Index: /pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c	(revision 2130)
+++ /pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c	(revision 2131)
@@ -37,8 +37,8 @@
 
 #define MAX_ASYNC_CNT	16
-#define POOL_LIS_INIT	4000
-#define POOL_LIS_INC	4001
-#define POOL_TP_INIT	4000
-#define POOL_TP_INC	4002
+#define POOL_LIS_INIT	512
+#define POOL_LIS_INC	512
+#define POOL_TP_INIT	512
+#define POOL_TP_INC	512
 
 struct tcp_listener;
Index: /pjproject/trunk/pjsip/src/pjsip/sip_transport_tls_ossl.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip/sip_transport_tls_ossl.c	(revision 2130)
+++ /pjproject/trunk/pjsip/src/pjsip/sip_transport_tls_ossl.c	(revision 2131)
@@ -67,8 +67,8 @@
 
 #define MAX_ASYNC_CNT	16
-#define POOL_LIS_INIT	4000
-#define POOL_LIS_INC	4001
-#define POOL_TP_INIT	4000
-#define POOL_TP_INC	4002
+#define POOL_LIS_INIT	512
+#define POOL_LIS_INC	512
+#define POOL_TP_INIT	512
+#define POOL_TP_INC	512
 
 
