about summary refs log tree commit diff stats
path: root/cpp/010vm
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-14 19:24:56 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-14 19:24:56 -0700
commit979403c6f624aab26e5ce5c619b2581ab688e521 (patch)
tree1e9cd19886d3a1fefd27ab0dc16d45f5dfa6d9a1 /cpp/010vm
parentadf83be9dc303fb7f94e4b73ed0a2d8f70c69c32 (diff)
downloadmu-979403c6f624aab26e5ce5c619b2581ab688e521.tar.gz
917
Diffstat (limited to 'cpp/010vm')
-rw-r--r--cpp/010vm6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/010vm b/cpp/010vm
index ee8be9cb..57f0be1f 100644
--- a/cpp/010vm
+++ b/cpp/010vm
@@ -183,3 +183,9 @@ string slurp_until(istream& in, char delim) {
   }
   return out.str();
 }
+
+void dump_memory() {
+  for (unordered_map<int, int>::iterator p = Memory.begin(); p != Memory.end(); ++p) {
+    cout << p->first << ": " << p->second << '\n';
+  }
+}