aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-09-28 19:03:37 +0200
committerDamjan Marion <damarion@cisco.com>2020-09-28 20:34:07 +0200
commit4537c30925050ffa34c33e6a481f07f1ec0a01ff (patch)
tree0516dba983516dd12027cd59d18e514dcebe24de /src/vlib/threads.c
parenta8af7cf253c4e8ab9ba1a2cfed50f6236fea3a62 (diff)
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 <damarion@cisco.com>
Diffstat (limited to 'src/vlib/threads.c')
-rw-r--r--src/vlib/threads.c12
1 files changed, 8 insertions, 4 deletions
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;