diff options
Diffstat (limited to 'rts/sm/Storage.c')
-rw-r--r-- | rts/sm/Storage.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 98aefa9a4b..f5419abc9c 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -45,6 +45,7 @@ StgIndStatic *dyn_caf_list = NULL; StgIndStatic *debug_caf_list = NULL; StgIndStatic *revertible_caf_list = NULL; bool keepCAFs; +bool highMemDynamic; W_ large_alloc_lim; /* GC if n_large_blocks in any nursery * reaches this. */ @@ -518,7 +519,7 @@ newCAF(StgRegTable *reg, StgIndStatic *caf) bh = lockCAF(reg, caf); if (!bh) return NULL; - if(keepCAFs) + if(keepCAFs && !(highMemDynamic && (void*) caf > (void*) 0x80000000)) { // Note [dyn_caf_list] // If we are in GHCi _and_ we are using dynamic libraries, @@ -572,6 +573,12 @@ setKeepCAFs (void) keepCAFs = 1; } +void +setHighMemDynamic (void) +{ + highMemDynamic = 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 |