diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-06-08 00:57:50 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-06-08 00:57:50 -0700 |
commit | 1f7a6274017821d58f3087120079477ac211ceaf (patch) | |
tree | 70bab77418ffa983b1188aaa8e8d2b40336087bd | |
parent | ab3704170e4b9e3f3ece995d6209c353a463a4a1 (diff) | |
download | gem5-1f7a6274017821d58f3087120079477ac211ceaf.tar.xz |
Mem: Use sysconf to get the page size instead of the PAGE_SIZE macro.
-rw-r--r-- | src/mem/physical.cc | 2 |
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); } |