From 13637632b87938a055618f17ed21b2a54b02459d Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Fri, 20 Jul 2018 15:33:17 +0200 Subject: physmem: fix alloc when dlmaloc is used Change-Id: I4b6cdf95ac694c8408eb6cf3259b335a8148b5aa Signed-off-by: Damjan Marion --- src/vlib/linux/physmem.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/vlib') diff --git a/src/vlib/linux/physmem.c b/src/vlib/linux/physmem.c index 6c6b072f70a..4d16486dea1 100755 --- a/src/vlib/linux/physmem.c +++ b/src/vlib/linux/physmem.c @@ -112,7 +112,11 @@ unix_physmem_alloc_aligned (vlib_main_t * vm, vlib_physmem_region_index_t idx, vec_free (to_free); } - return lo_offset != ~0 ? pr->heap + lo_offset : 0; +#if USE_DLMALLOC == 0 + return lo_offset != ~0 ? (void *) (pr->heap + lo_offset) : 0; +#else + return lo_offset != ~0 ? (void *) lo_offset : 0; +#endif } static void -- cgit 1.2.3-korg