From b7832555d57ef47740124c46e7b21f6d10b08f26 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 6 Oct 2006 21:45:34 -0400 Subject: system.cc: Make new_page() check for an out of memory condition src/sim/system.cc: Make new_page() check for an out of memory condition --HG-- extra : convert_revision : daee82788464fca186eb24285b5f43c9fabc25b3 --- src/sim/system.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sim/system.cc b/src/sim/system.cc index ad70b9b03..11ae492b9 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -219,6 +219,8 @@ System::new_page() { Addr return_addr = page_ptr << LogVMPageSize; ++page_ptr; + if (return_addr >= physmem->size()) + fatal("Out of memory, please increase size of physical memory."); return return_addr; } #endif -- cgit v1.2.3