aboutsummaryrefslogtreecommitdiff
path: root/gc.h
diff options
context:
space:
mode:
Diffstat (limited to 'gc.h')
-rw-r--r--gc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gc.h b/gc.h
index d116a18..eae0958 100644
--- a/gc.h
+++ b/gc.h
@@ -5,7 +5,7 @@
#include <map>
const int GC_QUEUE_SIZE = 262144;
-const size_t GC_CYC_THRESHOLD = 1000;
+const size_t GC_CYC_THRESHOLD = GC_QUEUE_SIZE >> 2;
typedef std::map<EvalObj*, size_t> EvalObj2Int;
typedef std::set<EvalObj*> EvalObjSet;
@@ -33,12 +33,15 @@ class GarbageCollector {
EvalObj2Int mapping;
PendingEntry *pending_list;
+ size_t resolve_threshold;
public:
GarbageCollector();
void cycle_resolve();
void force();
void expose(EvalObj *ptr);
+ void set_resolve_threshold(size_t new_thres);
+ size_t get_remaining();
EvalObj *attach(EvalObj *ptr);
};