diff options
-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); } |