aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/vlib/linux/physmem.c6
1 files changed, 5 insertions, 1 deletions
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