summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-06-08 00:57:50 -0700
committerGabe Black <gblack@eecs.umich.edu>2011-06-08 00:57:50 -0700
commit1f7a6274017821d58f3087120079477ac211ceaf (patch)
tree70bab77418ffa983b1188aaa8e8d2b40336087bd
parentab3704170e4b9e3f3ece995d6209c353a463a4a1 (diff)
downloadgem5-1f7a6274017821d58f3087120079477ac211ceaf.tar.xz
Mem: Use sysconf to get the page size instead of the PAGE_SIZE macro.
-rw-r--r--src/mem/physical.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mem/physical.cc b/src/mem/physical.cc
index 84af4c752..7337c800c 100644
--- a/src/mem/physical.cc
+++ b/src/mem/physical.cc
@@ -90,7 +90,7 @@ PhysicalMemory::PhysicalMemory(const Params *p)
int fd = open(params()->file.c_str(), O_RDONLY);
_size = lseek(fd, 0, SEEK_END);
lseek(fd, 0, SEEK_SET);
- pmemAddr = (uint8_t *)mmap(NULL, roundUp(size(), PAGE_SIZE),
+ pmemAddr = (uint8_t *)mmap(NULL, roundUp(size(), sysconf(_SC_PAGESIZE)),
PROT_READ | PROT_WRITE, map_flags, fd, 0);
}