diff options
author | Dave Barach <dave@barachs.net> | 2020-02-11 15:06:34 -0500 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-02-11 23:57:18 +0000 |
commit | 2c8e0023f91882e53f06eb99c901b97fe013f981 (patch) | |
tree | a0026aa039284780b7ec5da6f913e9cab5edd489 /src/svm/svm.c | |
parent | a6ef36b2c25de47824a1b45e147ab2fbf67c3a33 (diff) |
vppinfra: remove the historical mheap memory allocator
The mheap allocator has been turned off for several releases. This
commit removes the cmake config parameter, parallel support for
dlmalloc and mheap, and the mheap allocator itself.
Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I104f88a1f06e47e90e5f7fb3e11cd1ca66467903
Diffstat (limited to 'src/svm/svm.c')
-rw-r--r-- | src/svm/svm.c | 28 |
1 files changed, 0 insertions, 28 deletions
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); |