projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f14ea0
)
Mem: Fix size check when allocating physical memory
author
Lena Olson
<lena@cs.wisc.edu>
Tue, 15 May 2012 01:31:33 +0000
(20:31 -0500)
committer
Lena Olson
<lena@cs.wisc.edu>
Tue, 15 May 2012 01:31:33 +0000
(20:31 -0500)
src/sim/system.cc
patch
|
blob
|
history
diff --git
a/src/sim/system.cc
b/src/sim/system.cc
index 815a4cf1cd60a635386385475cb3c5f6a7e4c5de..906f7947f614defeca3e513bdedbeb9f52f559f6 100644
(file)
--- 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;
}