diff options
author | Damjan Marion <damarion@cisco.com> | 2018-07-20 15:33:17 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-07-20 17:38:22 +0000 |
commit | 13637632b87938a055618f17ed21b2a54b02459d (patch) | |
tree | 04f70bf2dd3918d25dd6e1b0e1d039b43146b74c /src/vlib | |
parent | 3e13c092a59a575ab8fee24c54762e47ae8c9850 (diff) |
physmem: fix alloc when dlmaloc is used
Change-Id: I4b6cdf95ac694c8408eb6cf3259b335a8148b5aa
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib')
-rwxr-xr-x | src/vlib/linux/physmem.c | 6 |
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 |