diff options
Diffstat (limited to 'src/vppinfra/linux/mem.c')
-rw-r--r-- | src/vppinfra/linux/mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c index 2d8f593d2b6..0bc08787baa 100644 --- a/src/vppinfra/linux/mem.c +++ b/src/vppinfra/linux/mem.c @@ -167,7 +167,7 @@ clib_mem_vm_ext_alloc (clib_mem_vm_alloc_t * a) } if (fd != -1) - if ((ftruncate (fd, a->size)) == -1) + if ((ftruncate (fd, n_pages * (1 << log2_page_size))) == -1) { err = clib_error_return_unix (0, "ftruncate"); goto error; |