projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab37041
)
Mem: Use sysconf to get the page size instead of the PAGE_SIZE macro.
author
Gabe Black
<gblack@eecs.umich.edu>
Wed, 8 Jun 2011 07:57:50 +0000
(
00:57
-0700)
committer
Gabe Black
<gblack@eecs.umich.edu>
Wed, 8 Jun 2011 07:57:50 +0000
(
00:57
-0700)
src/mem/physical.cc
patch
|
blob
|
history
diff --git
a/src/mem/physical.cc
b/src/mem/physical.cc
index 84af4c752af32b3da1ea57db797f6bf70c12723b..7337c800c6167bd6e8e6b67e64fe3a8c648aaa5e 100644
(file)
--- 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);
}