summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-05-16 22:13:02 -0400
committerBen Gamari <ben@smart-cactus.org>2019-10-20 21:15:52 -0400
commitdd1b4fddacf398f120099268538a358c6f6f4761 (patch)
treeed58a100ab568fcdca061bcca8afc3b31bbc0e54
parentbd8e3ff43b64a72ed1c820e89691d0a83a1c6e96 (diff)
downloadhaskell-dd1b4fddacf398f120099268538a358c6f6f4761.tar.gz
Nonmoving: Disable memory inventory with concurrent collection
-rw-r--r--rts/sm/Sanity.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c
index 0724a0059a..0159488856 100644
--- a/rts/sm/Sanity.c
+++ b/rts/sm/Sanity.c
@@ -1061,6 +1061,14 @@ memInventory (bool show)
W_ live_blocks = 0, free_blocks = 0;
bool leak;
+#if defined(THREADED_RTS)
+ // Can't easily do a memory inventory: We might race with the nonmoving
+ // collector. In principle we could try to take nonmoving_collection_mutex
+ // and do an inventory if we have it but we don't currently implement this.
+ if (RtsFlags.GcFlags.useNonmoving)
+ return;
+#endif
+
// count the blocks we current have
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {