aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/linux/mem.c1
-rw-r--r--src/vppinfra/mem.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c
index 96fb0db5b73..ef98b3f360b 100644
--- a/src/vppinfra/linux/mem.c
+++ b/src/vppinfra/linux/mem.c
@@ -579,6 +579,7 @@ clib_mem_vm_map_internal (void *base, clib_mem_page_sz_t log2_page_sz,
hdr->base_addr = (uword) base;
hdr->log2_page_sz = log2_page_sz;
hdr->num_pages = size >> log2_page_sz;
+ hdr->fd = fd;
snprintf (hdr->name, CLIB_VM_MAP_HDR_NAME_MAX_LEN - 1, "%s", (char *) name);
hdr->name[CLIB_VM_MAP_HDR_NAME_MAX_LEN - 1] = 0;
mprotect (hdr, sys_page_sz, PROT_NONE);
diff --git a/src/vppinfra/mem.h b/src/vppinfra/mem.h
index e6f019cd097..9d0aa0997fc 100644
--- a/src/vppinfra/mem.h
+++ b/src/vppinfra/mem.h
@@ -83,6 +83,9 @@ typedef struct _clib_mem_vm_map_hdr
/* page size (log2) */
clib_mem_page_sz_t log2_page_sz;
+ /* file descriptor, -1 if memory is not shared */
+ int fd;
+
/* allocation mame */
#define CLIB_VM_MAP_HDR_NAME_MAX_LEN 64
char name[CLIB_VM_MAP_HDR_NAME_MAX_LEN];