diff options
author | Lena Olson <lena@cs.wisc.edu> | 2012-05-14 20:31:33 -0500 |
---|---|---|
committer | Lena Olson <lena@cs.wisc.edu> | 2012-05-14 20:31:33 -0500 |
commit | 8fe8efeb34ae33e36bff77c4eb42d1ebfa95a7e8 (patch) | |
tree | d520813fe55bd4d2ed3fd4a4eb2f6b8c651e1458 /src/sim | |
parent | 7f14ea0c0053f49ada31a51a3d88c44abb18cf66 (diff) | |
download | gem5-8fe8efeb34ae33e36bff77c4eb42d1ebfa95a7e8.tar.xz |
Mem: Fix size check when allocating physical memory
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/system.cc | 2 |
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; } |