diff options
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/System.py | 7 | ||||
-rw-r--r-- | src/sim/system.cc | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/sim/System.py b/src/sim/System.py index 630cd2a84..e24a1e6b2 100644 --- a/src/sim/System.py +++ b/src/sim/System.py @@ -59,6 +59,13 @@ class System(MemObject): "All memories in the system") mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in") + # When reserving memory on the host, we have the option of + # reserving swap space or not (by passing MAP_NORESERVE to + # mmap). By enabling this flag, we accomodate cases where a large + # (but sparse) memory is simulated. + mmap_using_noreserve = Param.Bool(False, "mmap the backing store " \ + "without reserving swap") + # The memory ranges are to be populated when creating the system # such that these can be passed from the I/O subsystem through an # I/O bridge or cache diff --git a/src/sim/system.cc b/src/sim/system.cc index c311d65b9..9bd487b03 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -88,7 +88,7 @@ System::System(Params *p) loadAddrMask(p->load_addr_mask), loadAddrOffset(p->load_offset), nextPID(0), - physmem(name() + ".physmem", p->memories), + physmem(name() + ".physmem", p->memories, p->mmap_using_noreserve), memoryMode(p->mem_mode), _cacheLineSize(p->cache_line_size), workItemsBegin(0), |