diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vlib/linux/physmem.c | 2 | ||||
-rw-r--r-- | src/vppinfra/linux/mem.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/linux/physmem.c b/src/vlib/linux/physmem.c index 1a449921857..b247efc9a85 100644 --- a/src/vlib/linux/physmem.c +++ b/src/vlib/linux/physmem.c @@ -163,7 +163,7 @@ unix_physmem_region_alloc (vlib_main_t * vm, char *name, u32 size, for (i = 0; i < pr->n_pages; i++) { - void *ptr = pr->mem + (i << pr->log2_page_size); + void *ptr = pr->mem + ((u64) i << pr->log2_page_size); int node; if ((move_pages (0, 1, &ptr, 0, &node, 0) == 0) && (numa_node != node)) { diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c index 75d2a7e0559..475e3dcd747 100644 --- a/src/vppinfra/linux/mem.c +++ b/src/vppinfra/linux/mem.c @@ -198,7 +198,7 @@ clib_mem_vm_ext_alloc (clib_mem_vm_alloc_t * a) } if (fd != -1) - if ((ftruncate (fd, n_pages * (1 << log2_page_size))) == -1) + if ((ftruncate (fd, (u64) n_pages * (1 << log2_page_size))) == -1) { err = clib_error_return_unix (0, "ftruncate"); goto error; |