aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-08-29 08:50:40 -0400
committerFlorin Coras <florin.coras@gmail.com>2018-08-30 18:33:23 +0000
commite89be4ec559f4eb83ec37c9a452f73383665f5c0 (patch)
treea009c0332f23aa75ec199efd2a8dd1f6f677c42c /src/vppinfra
parentd1318256bfa69218beb10f9c9c0a5fcf1481eaf2 (diff)
Crude stat segment lock recovery
Make sure that vpp_get_stats main heap does not address-collide with the stats segment, which lands "somewhere" in the vpp address space. Add mising MAP_ANONYMOUS flag in clib_mem_vm_map Change-Id: I8a671d174eefd8dd24771ad2ed9f1250e2c7a9f8 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/mem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/mem.h b/src/vppinfra/mem.h
index 1646072e72f..0702aabb90a 100644
--- a/src/vppinfra/mem.h
+++ b/src/vppinfra/mem.h
@@ -348,7 +348,7 @@ always_inline void *
clib_mem_vm_map (void *addr, uword size)
{
void *mmap_addr;
- uword flags = MAP_PRIVATE | MAP_FIXED;
+ uword flags = MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS;
mmap_addr = mmap (addr, size, (PROT_READ | PROT_WRITE), flags, -1, 0);
if (mmap_addr == (void *) -1)