summaryrefslogtreecommitdiffstats
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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vppinfra/mem_dlmalloc.c b/src/vppinfra/mem_dlmalloc.c
index 50dc57a60bd..10d3c61c77e 100644
--- a/src/vppinfra/mem_dlmalloc.c
+++ b/src/vppinfra/mem_dlmalloc.c
@@ -543,6 +543,19 @@ mheap_alloc_with_lock (void *memory, uword size, int locked)
}
}
+void *
+clib_mem_create_heap (void *base, uword size, char *fmt, ...)
+{
+ base = clib_mem_vm_map_internal (base, CLIB_MEM_PAGE_SZ_DEFAULT, size, -1,
+ 0, "str");
+
+ if (base == 0)
+ return 0;
+
+ create_mspace_with_base (base, size, 1 /* locked */ );
+ return base;
+}
+
/*
* fd.io coding-style-patch-verification: ON
*