diff options
Diffstat (limited to 'src/vppinfra/linux/mem.c')
-rw-r--r-- | src/vppinfra/linux/mem.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c index bceb3b217b7..2d968fae0ac 100644 --- a/src/vppinfra/linux/mem.c +++ b/src/vppinfra/linux/mem.c @@ -252,6 +252,17 @@ done: return err; } +void +clib_mem_vm_ext_free (clib_mem_vm_alloc_t * a) +{ + if (a != 0) + { + clib_mem_vm_free (a->addr, 1 << a->log2_page_size); + if (a->fd != -1) + close (a->fd); + } +} + u64 * clib_mem_vm_get_paddr (void *mem, int log2_page_size, int n_pages) { |