vppinfra: don't call dlmalloc API directly from the code
[vpp.git] / src / svm / svm.c
index fc91782..c087655 100644 (file)
@@ -36,7 +36,6 @@
 #include <vppinfra/bitmap.h>
 #include <vppinfra/fifo.h>
 #include <vppinfra/time.h>
-#include <vppinfra/mheap.h>
 #include <vppinfra/heap.h>
 #include <vppinfra/pool.h>
 #include <vppinfra/format.h>
@@ -336,9 +335,8 @@ svm_data_region_create (svm_map_region_args_t * a, svm_region_t * rp)
 
   if (a->flags & SVM_FLAGS_MHEAP)
     {
-      rp->data_heap = create_mspace_with_base (rp->data_base,
-                                              map_size, 1 /* locked */ );
-      mspace_disable_expand (rp->data_heap);
+      rp->data_heap = clib_mem_create_heap (rp->data_base, map_size,
+                                           1 /* locked */ , "svm data");
 
       rp->flags |= SVM_FLAGS_MHEAP;
     }
@@ -487,12 +485,11 @@ svm_region_init_mapped_region (svm_map_region_args_t * a, svm_region_t * rp)
   rp->virtual_base = a->baseva;
   rp->virtual_size = a->size;
 
-  rp->region_heap = create_mspace_with_base
+  rp->region_heap = clib_mem_create_heap
     (uword_to_pointer (a->baseva + MMAP_PAGESIZE, void *),
      (a->pvt_heap_size !=
-      0) ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE, 1 /* locked */ );
-
-  mspace_disable_expand (rp->region_heap);
+      0) ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE, 1 /* locked */ ,
+     "svm region");
 
   oldheap = svm_push_pvt_heap (rp);