summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2020-02-18 09:38:27 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-29 05:08:36 -0500
commitb5fb58fd1a4a24b9273d9d2de65b6347e1654e98 (patch)
treeeec82775f0414f77d5444cd9e25a2885ba378a6e /rts
parenta999ee96a22650b59855609f84e2808b4133e9e0 (diff)
downloadhaskell-b5fb58fd1a4a24b9273d9d2de65b6347e1654e98.tar.gz
Document and refactor a few things around bitmap scavenging
- Added a few comments in StgPAP - Added a few comments and assertions in scavenge_small_bitmap and walk_large_bitmap - Did tiny refactor in GHC.Data.Bitmap: added some comments, deleted dead code, used PlatformWordSize type.
Diffstat (limited to 'rts')
-rw-r--r--rts/sm/HeapUtils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/sm/HeapUtils.h b/rts/sm/HeapUtils.h
index 2e9ca34f73..aa3321e5dc 100644
--- a/rts/sm/HeapUtils.h
+++ b/rts/sm/HeapUtils.h
@@ -17,6 +17,10 @@ walk_large_bitmap(walk_closures_cb *cb,
StgWord size,
void *user)
{
+ // Bitmap may have more bits than `size` when scavenging PAP payloads. See
+ // comments around StgPAP.
+ ASSERT(large_bitmap->size >= size);
+
uint32_t b = 0;
for (uint32_t i = 0; i < size; b++) {