From e55a87ec7df7cb6e8244548625ebaf6d06b3fb4e Mon Sep 17 00:00:00 2001 From: Bostjan Meglic Date: Mon, 24 Apr 2023 06:44:18 +0000 Subject: [PATCH] [APP] Fix number of items of memory pool for subscriptions to NRF The subscriptions to NRF should be tied to the number of NF's and number of services per NF that we support, instead of number of UE's. This decreases memory usage of each NF slightly, depending on the configuration. --- lib/app/ogs-context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app/ogs-context.c b/lib/app/ogs-context.c index fe933aa00..55951cab2 100644 --- a/lib/app/ogs-context.c +++ b/lib/app/ogs-context.c @@ -76,13 +76,13 @@ static void recalculate_pool_size(void) self.pool.message = self.max.ue * POOL_NUM_PER_UE; self.pool.event = self.max.ue * POOL_NUM_PER_UE; self.pool.socket = self.max.ue * POOL_NUM_PER_UE; - self.pool.subscription = self.max.ue * POOL_NUM_PER_UE; self.pool.xact = self.max.ue * POOL_NUM_PER_UE; self.pool.stream = self.max.ue * POOL_NUM_PER_UE; self.pool.nf = self.max.peer; #define NF_SERVICE_PER_NF_INSTANCE 16 self.pool.nf_service = self.pool.nf * NF_SERVICE_PER_NF_INSTANCE; + self.pool.subscription = self.pool.nf * NF_SERVICE_PER_NF_INSTANCE; self.pool.gtp_node = self.pool.nf; if (self.max.gtp_peer)