summaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.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/vcl/vppcom.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/vcl/vppcom.c')
-rw-r--r--src/vcl/vppcom.c6
1 files changed, 2 insertions, 4 deletions
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;