From: Intel Date: Fri, 8 Nov 2013 02:00:00 +0000 (+0100) Subject: mem: remove hugepage file on unmap X-Git-Tag: spdx-start~11096 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=718bf2ae4dd8817342ac26cb90a3f9cf4de700d9;p=dpdk.git mem: remove hugepage file on unmap Signed-off-by: Intel --- diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 96de636b47..97c670525b 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -557,6 +557,11 @@ unmap_unneeded_hugepages(struct hugepage *hugepg_tbl, if (pages_found == hpi[size].num_pages[socket]) { munmap(hp->final_va, hp->size); hp->final_va = NULL; + if (remove(hp->filepath) == -1) { + RTE_LOG(ERR, EAL, "%s(): Removing %s failed: %s\n", + __func__, hp->filepath, strerror(errno)); + return -1; + } } /* lock the page and skip */ else