aboutsummaryrefslogtreecommitdiff
path: root/alloc.c
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2008-11-04 15:21:14 +0000
committerEric B Munson <ebmunson@us.ibm.com>2008-11-05 13:28:24 +0000
commit27f1acc648d305549159e065b36fb1a70596108f (patch)
tree1fe2e3cb663564fc4a4db3512a196d8029f1c7e6 /alloc.c
parent23ad273ae5f8ccd93ed607dcaaf1e24ec7b58991 (diff)
downloadlibhugetlbfs-27f1acc648d305549159e065b36fb1a70596108f.tar.gz
Do not pass offset to mmap() in get_huge_pages()
Currently an offset is being passed in to mmap() when allocating a region. This is pointless so pass in 0. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Acked-by: Adam Litke <agl@us.ibm.com> Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'alloc.c')
-rw-r--r--alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/alloc.c b/alloc.c
index 750b2cb..c118f18 100644
--- a/alloc.c
+++ b/alloc.c
@@ -89,7 +89,7 @@ void *get_huge_pages(size_t len, ghp_t flags)
/* Map the requested region */
buf = mmap(NULL, len, PROT_READ|PROT_WRITE,
- MAP_PRIVATE, heap_fd, len);
+ MAP_PRIVATE, heap_fd, 0);
if (buf == MAP_FAILED) {
close(heap_fd);