summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorGHC GitLab CI <ghc-ci@gitlab-haskell.org>2020-10-22 16:59:11 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-11 03:20:35 -0500
commit7a65f9e140906087273ce95f062775f18f6a708d (patch)
tree881be7a87883ad1b49a55abbd3e2a9cdd52bfbe0 /rts
parent2782487f5f6ad9df4dc8725226a47f07fec77f9f (diff)
downloadhaskell-7a65f9e140906087273ce95f062775f18f6a708d.tar.gz
rts: Introduce highMemDynamic
Diffstat (limited to 'rts')
-rw-r--r--rts/sm/Storage.c9
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