mem: Fix a bug in the memory serialization file naming
authorAndreas Hansson <andreas.hansson@arm.com>
Mon, 7 Jan 2013 18:05:35 +0000 (13:05 -0500)
committerAndreas Hansson <andreas.hansson@arm.com>
Mon, 7 Jan 2013 18:05:35 +0000 (13:05 -0500)
This patch fixes a bug that caused multiple systems to overwrite each
other physical memory. The system name is now included in the filename
such that this is avoided.

src/mem/physical.cc

index 2b750f0edb2b21558fe075c2b069b95063514b24..e38a4f76e035af46a3a40ec98d44b20dfa2f0da6 100644 (file)
@@ -293,7 +293,7 @@ PhysicalMemory::serializeStore(ostream& os, unsigned int store_id,
 {
     // we cannot use the address range for the name as the
     // memories that are not part of the address map can overlap
-    string filename = "store" + to_string(store_id) + ".pmem";
+    string filename = name() + ".store" + to_string(store_id) + ".pmem";
     long range_size = range.size();
 
     DPRINTF(Checkpoint, "Serializing physical memory %s with size %d\n",