void
newCAF(StgRegTable *reg, StgClosure* caf)
{
-#ifdef DYNAMIC
if(keepCAFs)
{
// HACK:
RELEASE_SM_LOCK;
}
else
-#endif
{
// Put this CAF on the mutable list for the old generation.
((StgIndStatic *)caf)->saved_info = NULL;
}
}
+// External API for setting the keepCAFs flag. see #3900.
+void
+setKeepCAFs (void)
+{
+ keepCAFs = 1;
+}
+
// An alternate version of newCaf which is used for dynamically loaded
// object code in GHCi. In this case we want to retain *all* CAFs in
// the object code, because they might be demanded at any time from an