summaryrefslogtreecommitdiff
path: root/src/sim/system.cc
diff options
context:
space:
mode:
authorLena Olson <lena@cs.wisc.edu>2012-05-14 20:31:33 -0500
committerLena Olson <lena@cs.wisc.edu>2012-05-14 20:31:33 -0500
commit8fe8efeb34ae33e36bff77c4eb42d1ebfa95a7e8 (patch)
treed520813fe55bd4d2ed3fd4a4eb2f6b8c651e1458 /src/sim/system.cc
parent7f14ea0c0053f49ada31a51a3d88c44abb18cf66 (diff)
downloadgem5-8fe8efeb34ae33e36bff77c4eb42d1ebfa95a7e8.tar.xz
Mem: Fix size check when allocating physical memory
Diffstat (limited to 'src/sim/system.cc')
-rw-r--r--src/sim/system.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 815a4cf1c..906f7947f 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -298,7 +298,7 @@ System::allocPhysPages(int npages)
{
Addr return_addr = pagePtr << LogVMPageSize;
pagePtr += npages;
- if (pagePtr > physmem.totalSize())
+ if ((pagePtr << LogVMPageSize) > physmem.totalSize())
fatal("Out of memory, please increase size of physical memory.");
return return_addr;
}