summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2018-01-16 08:32:20 -0600
committerRichard Mudgett <rmudgett@digium.com>2018-01-16 12:42:06 -0600
commit7ed7d525fb5d2fff6eb997b5a3b564ada83d95e0 (patch)
treece4bb2a4be88afac398fe2900c21d099f5d33fd8
parent2f392bedb3987ee3c587bd8b046299320b84d5c5 (diff)
taskprocessor.c: Increase the number of tps_singletons container buckets.
Since v12 the number of taskprocessors in the system has increased a lot. Small systems can easily have over a hundred and larger systems can have thousands. Most uses of the tps_singletons container deal with creating and destroying the taskprocessors. However, the pjsip distributor looks up taskprocessors/serializers by name frequently. It needs to find the serializer for incoming SIP responses to distribute them to the appropriate serializer. Change-Id: Ice0603606614ba49f7c0c316c524735c064e7e43
-rw-r--r--main/taskprocessor.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/taskprocessor.c b/main/taskprocessor.c
index 6793542ab..cf82efff2 100644
--- a/main/taskprocessor.c
+++ b/main/taskprocessor.c
@@ -112,7 +112,13 @@ struct ast_taskprocessor_listener {
void *user_data;
};
-#define TPS_MAX_BUCKETS 7
+#ifdef LOW_MEMORY
+#define TPS_MAX_BUCKETS 61
+#else
+/*! \brief Number of buckets in the tps_singletons container. */
+#define TPS_MAX_BUCKETS 1567
+#endif
+
/*! \brief tps_singletons is the astobj2 container for taskprocessor singletons */
static struct ao2_container *tps_singletons;