summaryrefslogtreecommitdiff
path: root/rts/RtsUtils.c
diff options
context:
space:
mode:
authorTobias Guggenmos <tguggenm@redhat.com>2019-09-07 15:32:06 +0200
committerBen Gamari <ben@smart-cactus.org>2019-10-02 15:29:49 -0400
commit5d5317797a53e2cab8afa4d81c3c0e7c349236df (patch)
tree6a5d64604b01a438dd8c7c5a3830b6e2ee5c1d71 /rts/RtsUtils.c
parentb8fb1d80a47674715a1a444e9f99c179dd1cf51c (diff)
downloadhaskell-wip/zero_on_gc.tar.gz
Add new debug flag -DZwip/zero_on_gc
Zeros heap memory after gc freed it.
Diffstat (limited to 'rts/RtsUtils.c')
-rw-r--r--rts/RtsUtils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c
index 2a53d18572..b9ddb2a345 100644
--- a/rts/RtsUtils.c
+++ b/rts/RtsUtils.c
@@ -79,7 +79,7 @@ stgMallocBytes (size_t n, char *msg)
rtsConfig.mallocFailHook((W_) n, msg);
stg_exit(EXIT_INTERNAL_ERROR);
}
- IF_DEBUG(sanity, memset(space, 0xbb, n));
+ IF_DEBUG(zero_on_gc, memset(space, 0xbb, n));
return space;
}