aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/mheap.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-02-11 15:06:34 -0500
committerFlorin Coras <florin.coras@gmail.com>2020-02-11 23:57:18 +0000
commit2c8e0023f91882e53f06eb99c901b97fe013f981 (patch)
treea0026aa039284780b7ec5da6f913e9cab5edd489 /src/vppinfra/mheap.h
parenta6ef36b2c25de47824a1b45e147ab2fbf67c3a33 (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/vppinfra/mheap.h')
-rw-r--r--src/vppinfra/mheap.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/vppinfra/mheap.h b/src/vppinfra/mheap.h
index 61d262c5f33..dc0e6072081 100644
--- a/src/vppinfra/mheap.h
+++ b/src/vppinfra/mheap.h
@@ -38,62 +38,11 @@
#ifndef included_mheap_h
#define included_mheap_h
-#if USE_DLMALLOC == 0
-
-#include <vppinfra/vec.h>
-#include <vppinfra/error.h> /* clib_error_t */
-#include <vppinfra/mem.h> /* clib_mem_usage_t */
-#include <vppinfra/format.h> /* for unformat_input_t */
-
-/* Allocate size bytes. New heap and offset are returned.
- offset == ~0 means allocation failed. */
-always_inline void *
-mheap_get (void *v, uword size, uword * offset_return)
-{
- return mheap_get_aligned (v, size, 0, 0, offset_return);
-}
-
-/* Create allocation heap of given size.
- * The actual usable size is smaller than the requested size.
- * memory_bytes must be greater than mheap_page_size + sizeof (mheap_t) + 16.
- * Otherwise, allocation may fail and return 0.
- */
-void *mheap_alloc (void *memory, uword memory_bytes);
-void *mheap_alloc_with_flags (void *memory, uword memory_bytes, uword flags);
-void *mheap_alloc_with_lock (void *memory, uword size, int locked);
-
-#define mheap_free(v) (v) = _mheap_free(v)
-void *_mheap_free (void *v);
-
-void mheap_foreach (void *v,
- uword (*func) (void *arg, void *v, void *elt_data,
- uword elt_size), void *arg);
-
-/* Format mheap data structures as string. */
-u8 *format_mheap (u8 * s, va_list * va);
-
-/* Validate internal consistency. */
-void mheap_validate (void *h);
-
-/* Query bytes used. */
-uword mheap_bytes (void *v);
-
-void mheap_usage (void *v, clib_mem_usage_t * usage);
-
-/* Enable disable tracing. */
-void mheap_trace (void *v, int enable);
-
-/* Test routine. */
-int test_mheap_main (unformat_input_t * input);
-
-#else /* USE_DLMALLOC */
/* Format mheap data structures as string. */
u8 *format_mheap (u8 * s, va_list * va);
void *mheap_alloc_with_lock (void *memory, uword size, int locked);
void mheap_usage (void *v, clib_mem_usage_t * usage);
-#endif /* USE_DLMALLOC */
-
#endif /* included_mheap_h */
/*