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/vcl/vppcom.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/vcl') diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 7286882adac..8a934c3686a 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -1254,8 +1254,7 @@ void vppcom_app_destroy (void) { vcl_worker_t *wrk, *current_wrk; - struct dlmallinfo mi; - mspace heap; + void *heap; if (!pool_elts (vcm->workers)) return; @@ -1280,8 +1279,7 @@ vppcom_app_destroy (void) * Free the heap and fix vcm */ heap = clib_mem_get_heap (); - mi = mspace_mallinfo (heap); - munmap (mspace_least_addr (heap), mi.arena); + munmap (clib_mem_get_heap_base (heap), clib_mem_get_heap_size (heap)); vcm = &_vppcom_main; vcm->is_init = 0; -- cgit 1.2.3-korg