From 4537c30925050ffa34c33e6a481f07f1ec0a01ff Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 28 Sep 2020 19:03:37 +0200 Subject: vppinfra: don't call dlmalloc API directly from the code - it is confusing from end consumer perspective that some thing is somewhere called heap and somewhere mspace - this is base for additional work where heap pointer is not the same thing like mspace Type: improvement Change-Id: I644d5a0de17690d65d164d8cec3c5654571629ef Signed-off-by: Damjan Marion --- src/vlib/threads.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/vlib/threads.c') diff --git a/src/vlib/threads.c b/src/vlib/threads.c index c2ac4a1b389..0fc306db6f2 100644 --- a/src/vlib/threads.c +++ b/src/vlib/threads.c @@ -757,8 +757,10 @@ start_workers (vlib_main_t * vm) vec_add2 (vlib_worker_threads, w, 1); /* Currently unused, may not really work */ if (tr->mheap_size) - w->thread_mheap = create_mspace (tr->mheap_size, - 0 /* unlocked */ ); + w->thread_mheap = clib_mem_create_heap (0, tr->mheap_size, + /* unlocked */ 0, + "%s%d heap", + tr->name, k); else w->thread_mheap = main_heap; @@ -927,8 +929,10 @@ start_workers (vlib_main_t * vm) vec_add2 (vlib_worker_threads, w, 1); if (tr->mheap_size) { - w->thread_mheap = - create_mspace (tr->mheap_size, 0 /* locked */ ); + w->thread_mheap = clib_mem_create_heap (0, tr->mheap_size, + /* locked */ 0, + "%s%d heap", + tr->name, j); } else w->thread_mheap = main_heap; -- cgit 1.2.3-korg