aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/mem_dlmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/mem_dlmalloc.c')
-rw-r--r--src/vppinfra/mem_dlmalloc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vppinfra/mem_dlmalloc.c b/src/vppinfra/mem_dlmalloc.c
index 663b2f162f7..1b0dbb24500 100644
--- a/src/vppinfra/mem_dlmalloc.c
+++ b/src/vppinfra/mem_dlmalloc.c
@@ -237,6 +237,23 @@ clib_mem_init_thread_safe (void *memory, uword memory_size)
1 /* do clib_mem_set_heap */ );
}
+void
+clib_mem_destroy_mspace (void *mspace)
+{
+ mheap_trace_main_t *tm = &mheap_trace_main;
+
+ if (tm->enabled && mspace == tm->current_traced_mheap)
+ tm->enabled = 0;
+
+ destroy_mspace (mspace);
+}
+
+void
+clib_mem_destroy (void)
+{
+ clib_mem_destroy_mspace (clib_mem_get_heap ());
+}
+
void *
clib_mem_init_thread_safe_numa (void *memory, uword memory_size, u8 numa)
{