mem: Avoid explicitly zeroing the memory backing store
This patch removes the explicit memset as it is redundant and causes the simulator to touch the entire space, forcing the host system to allocate the pages. Anonymous pages are mapped on the first access, and the page-fault handler is responsible for zeroing them. Thus, the pages are still zeroed, but we avoid touching the entire allocated space which enables us to use much larger memory sizes as long as not all the memory is actually used.
This commit is contained in:
@@ -48,7 +48,6 @@ class AbstractMemory(MemObject):
|
||||
cxx_header = "mem/abstract_mem.hh"
|
||||
range = Param.AddrRange(AddrRange('128MB'), "Address range")
|
||||
null = Param.Bool(False, "Do not store data, always return zero")
|
||||
zero = Param.Bool(False, "Initialize memory with zeros")
|
||||
|
||||
# All memories are passed to the global physical memory, and
|
||||
# certain memories may be excluded from the global address map,
|
||||
|
||||
Reference in New Issue
Block a user