diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/Linker.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h index ea4daebc8a..e7e2ea5ce5 100644 --- a/includes/rts/Linker.h +++ b/includes/rts/Linker.h @@ -22,8 +22,25 @@ typedef char pathchar; #define PATH_FMT "s" #endif -/* initialize the object linker */ -void initLinker( void ); +/* Initialize the object linker. Equivalent to initLinker_(1). */ +void initLinker (void); + +/* Initialize the object linker. + * The retain_cafs argument is: + * + * non-zero => Retain CAFs unconditionally in linked Haskell code. + * Note that this prevents any code from being unloaded. + * It should not be necessary unless you are GHCi or + * hs-plugins, which needs to be able call any function + * in the compiled code. + * + * zero => Do not retain CAFs. Everything reachable from foreign + * exports will be retained, due to the StablePtrs + * created by the module initialisation code. unloadObj + * free these StablePtrs, which will allow the CAFs to + * be GC'd and the code to be removed. + */ +void initLinker_ (int retain_cafs); /* insert a symbol in the hash table */ void insertSymbol(pathchar* obj_name, char* key, void* data); |