summaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/fifo_segment.c6
-rw-r--r--src/svm/ssvm.c15
-rw-r--r--src/svm/svm.c28
3 files changed, 0 insertions, 49 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c
index 43efbc336da..58c11383e43 100644
--- a/src/svm/fifo_segment.c
+++ b/src/svm/fifo_segment.c
@@ -1025,12 +1025,6 @@ format_fifo_segment (u8 * s, va_list * args)
int i;
indent = format_get_indent (s) + 2;
-#if USE_DLMALLOC == 0
- s = format (s, "%U segment heap: %U\n", format_white_space, indent,
- format_mheap, fsh->ssvm_sh->heap, verbose);
- s = format (s, "%U segment has %u active fifos\n",
- format_white_space, indent, fifo_segment_num_fifos (fsh));
-#endif
if (fs == 0)
{
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index 66e38ebf864..0305278a6b6 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -29,9 +29,6 @@ int
ssvm_master_init_shm (ssvm_private_t * ssvm)
{
int ssvm_fd;
-#if USE_DLMALLOC == 0
- int mh_flags = MHEAP_FLAG_DISABLE_VM | MHEAP_FLAG_THREAD_SAFE;
-#endif
clib_mem_vm_map_t mapa = { 0 };
u8 junk = 0, *ssvm_filename;
ssvm_shared_header_t *sh;
@@ -104,15 +101,10 @@ ssvm_master_init_shm (ssvm_private_t * ssvm)
sh->ssvm_size = ssvm->ssvm_size;
sh->ssvm_va = pointer_to_uword (sh);
sh->type = SSVM_SEGMENT_SHM;
-#if USE_DLMALLOC == 0
- sh->heap = mheap_alloc_with_flags (((u8 *) sh) + page_size,
- ssvm->ssvm_size - page_size, mh_flags);
-#else
sh->heap = create_mspace_with_base (((u8 *) sh) + page_size,
ssvm->ssvm_size - page_size,
1 /* locked */ );
mspace_disable_expand (sh->heap);
-#endif
oldheap = ssvm_push_heap (sh);
sh->name = format (0, "%s", ssvm->name, 0);
@@ -261,17 +253,10 @@ ssvm_master_init_memfd (ssvm_private_t * memfd)
sh->ssvm_va = pointer_to_uword (sh);
sh->type = SSVM_SEGMENT_MEMFD;
-#if USE_DLMALLOC == 0
- uword flags = MHEAP_FLAG_DISABLE_VM | MHEAP_FLAG_THREAD_SAFE;
-
- sh->heap = mheap_alloc_with_flags (((u8 *) sh) + page_size,
- memfd->ssvm_size - page_size, flags);
-#else
sh->heap = create_mspace_with_base (((u8 *) sh) + page_size,
memfd->ssvm_size - page_size,
1 /* locked */ );
mspace_disable_expand (sh->heap);
-#endif
oldheap = ssvm_push_heap (sh);
sh->name = format (0, "%s", memfd->name, 0);
ssvm_pop_heap (oldheap);
diff --git a/src/svm/svm.c b/src/svm/svm.c
index cc49eb3c6e2..c702625db7e 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -240,16 +240,6 @@ format_svm_region (u8 * s, va_list * args)
}
}
}
-#if USE_DLMALLOC == 0
- s = format (s, " rgn heap stats: %U", format_mheap,
- rp->region_heap, 0);
- if ((rp->flags & SVM_FLAGS_MHEAP) && rp->data_heap)
- {
- s = format (s, "\n data heap stats: %U", format_mheap,
- rp->data_heap, 1);
- }
- s = format (s, "\n");
-#endif
}
return (s);
@@ -345,18 +335,9 @@ svm_data_region_create (svm_map_region_args_t * a, svm_region_t * rp)
if (a->flags & SVM_FLAGS_MHEAP)
{
-#if USE_DLMALLOC == 0
- mheap_t *heap_header;
- rp->data_heap =
- mheap_alloc_with_flags ((void *) (rp->data_base), map_size,
- MHEAP_FLAG_DISABLE_VM);
- heap_header = mheap_header (rp->data_heap);
- heap_header->flags |= MHEAP_FLAG_THREAD_SAFE;
-#else
rp->data_heap = create_mspace_with_base (rp->data_base,
map_size, 1 /* locked */ );
mspace_disable_expand (rp->data_heap);
-#endif
rp->flags |= SVM_FLAGS_MHEAP;
}
@@ -504,21 +485,12 @@ 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;
-#if USE_DLMALLOC == 0
- rp->region_heap =
- mheap_alloc_with_flags (uword_to_pointer
- (a->baseva + MMAP_PAGESIZE, void *),
- (a->pvt_heap_size !=
- 0) ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE,
- MHEAP_FLAG_DISABLE_VM);
-#else
rp->region_heap = create_mspace_with_base
(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);
-#endif
oldheap = svm_push_pvt_heap (rp);