about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-11-19 02:40:36 -0800
committerKartik K. Agaram <vc@akkartik.com>2017-11-19 02:40:36 -0800
commit5a39e8c0493b921835ad53dd058d5da981e16178 (patch)
tree44f8c519c53a789e5549f1c18677ef068a2b0475
parentf64f1ca50ead1af7feeb76b9a1d86e7a07060387 (diff)
downloadmu-5a39e8c0493b921835ad53dd058d5da981e16178.tar.gz
4126
-rw-r--r--076continuation.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/076continuation.cc b/076continuation.cc
index 330889eb..5e083986 100644
--- a/076continuation.cc
+++ b/076continuation.cc
@@ -209,12 +209,7 @@ if (is_mu_continuation(current_instruction().ingredients.at(0))) {
   for (call_stack::const_reverse_iterator p = new_calls.rbegin(); p != new_calls.rend(); ++p) {
     Current_routine->calls.push_front(*p);
     // ensure that the presence of a continuation keeps its stack frames from being reclaimed
-    int space_address = Current_routine->calls.front().default_space;
-    if (space_address != 0) {
-      int refcount = get_or_insert(Memory, space_address);
-      trace("mem") << "incrementing refcount of " << space_address << ": " << refcount << " -> " << refcount+1 << end();
-      put(Memory, space_address, refcount+1);
-    }
+    increment_refcount(Current_routine->calls.front().default_space);
   }
   if (Trace_stream) {
     Trace_stream->callstack_depth += SIZE(new_calls);