diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-14 21:35:36 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-14 21:35:36 +0800 |
commit | 2bb741508a93335b94adfabf3631abd39b8c6e8a (patch) | |
tree | 9def50b8bbe5a5f4f86a75dbc0867d4424191afd /gc.cpp | |
parent | 3bf02a37cdd49d4d12c8fdf3a4a421d5dae3a75b (diff) |
big change in framework: unification of Continuation and RetAddr
Diffstat (limited to 'gc.cpp')
-rw-r--r-- | gc.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -92,10 +92,9 @@ void GarbageCollector::force() { #endif #ifdef GC_DEBUG -/* for (EvalObj2Int::iterator it = mapping.begin(); + for (EvalObj2Int::iterator it = mapping.begin(); it != mapping.end(); it++) fprintf(stderr, "%llx => %s\n", (ull)it->first, it->first->ext_repr().c_str()); - */ #endif } @@ -114,8 +113,7 @@ EvalObj *GarbageCollector::attach(EvalObj *ptr) { } void GarbageCollector::cycle_resolve() { - if (mapping.size() < resolve_threshold) - return; + if (mapping.size() < resolve_threshold) return; EvalObjSet visited; Container **clptr = cyc_list; for (EvalObj2Int::iterator it = mapping.begin(); @@ -155,8 +153,7 @@ void GarbageCollector::cycle_resolve() { void GarbageCollector::collect() { force(); - if (mapping.size() < resolve_threshold) - return; + if (mapping.size() < resolve_threshold) return; cycle_resolve(); force(); } |