From 8fe8efeb34ae33e36bff77c4eb42d1ebfa95a7e8 Mon Sep 17 00:00:00 2001 From: Lena Olson Date: Mon, 14 May 2012 20:31:33 -0500 Subject: Mem: Fix size check when allocating physical memory --- src/sim/system.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3