From 1f7a6274017821d58f3087120079477ac211ceaf Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 8 Jun 2011 00:57:50 -0700 Subject: [PATCH] Mem: Use sysconf to get the page size instead of the PAGE_SIZE macro. --- src/mem/physical.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2