summaryrefslogtreecommitdiff
path: root/rts/CheckUnload.h
diff options
context:
space:
mode:
Diffstat (limited to 'rts/CheckUnload.h')
-rw-r--r--rts/CheckUnload.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/rts/CheckUnload.h b/rts/CheckUnload.h
index ab85ead852..de07aef1c3 100644
--- a/rts/CheckUnload.h
+++ b/rts/CheckUnload.h
@@ -12,6 +12,34 @@
#include "BeginPrivate.h"
-void checkUnload (StgClosure *static_objects);
+#include "LinkerInternals.h"
+
+// Currently live objects
+extern ObjectCode *objects;
+
+// Root set for object collection
+extern ObjectCode *loaded_objects;
+
+// Mark bit for live objects
+extern uint8_t object_code_mark_bit;
+
+// Number of object code currently marked for unloading. See the definition in
+// CheckUnload.c for details.
+extern int n_unloaded_objects;
+
+void initUnloadCheck(void);
+void exitUnloadCheck(void);
+
+// Call before major GC to prepare section index table for marking
+bool prepareUnloadCheck(void);
+
+// Mark object code of a static closure address as 'live'
+void markObjectCode(const void *addr);
+
+// Call after major GC to unload unused and unmarked object code
+void checkUnload(void);
+
+// Call on loaded object code
+void insertOCSectionIndices(ObjectCode *oc);
#include "EndPrivate.h"