summaryrefslogtreecommitdiffstats
path: root/vppinfra
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-02-06 19:16:21 +0100
committerGerrit Code Review <gerrit@fd.io>2016-02-16 17:50:48 +0000
commitce8debfe0faaea959aed846f83a0e1ade5f5acd2 (patch)
treecda052cd0757e402e2c9f12930b2149848aa869e /vppinfra
parentd0386374d6759a3f056a604060140acd7c66926f (diff)
Increase number of per-cpu mheaps to 256
It also includes check to ensure that number of per-cpu mheaps is not lower than number of cpus. Change-Id: Ibc68b34dda130f922243f9ea15b03e44bbcac269 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vppinfra')
-rw-r--r--vppinfra/vppinfra/mem.h4
-rw-r--r--vppinfra/vppinfra/mem_mheap.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/vppinfra/vppinfra/mem.h b/vppinfra/vppinfra/mem.h
index 938f2d23502..301bcdd0d32 100644
--- a/vppinfra/vppinfra/mem.h
+++ b/vppinfra/vppinfra/mem.h
@@ -46,8 +46,10 @@
#include <vppinfra/string.h> /* memcpy, memset */
#include <vppinfra/valgrind.h>
+#define CLIB_MAX_MHEAPS 256
+
/* Per CPU heaps. */
-extern void * clib_per_cpu_mheaps[32];
+extern void * clib_per_cpu_mheaps[CLIB_MAX_MHEAPS];
always_inline void * clib_mem_get_per_cpu_heap (void)
{
diff --git a/vppinfra/vppinfra/mem_mheap.c b/vppinfra/vppinfra/mem_mheap.c
index e25ae35b77a..5718c8ce618 100644
--- a/vppinfra/vppinfra/mem_mheap.c
+++ b/vppinfra/vppinfra/mem_mheap.c
@@ -50,7 +50,7 @@ clib_smp_main_t clib_smp_main = {
.n_tls_4k_pages = 1,
};
-void * clib_per_cpu_mheaps[32];
+void * clib_per_cpu_mheaps[CLIB_MAX_MHEAPS];
void clib_mem_exit (void)
{