summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2019-09-19 10:16:09 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-21 09:53:29 -0400
commitded96fb3ad540e0145483574b4a09bdcbe964c88 (patch)
tree8d2e95a16b6dfefd9d976faef4245e2a114a1795 /includes
parent1ea8c451375be9829df22e87213137e71c9c05ac (diff)
downloadhaskell-ded96fb3ad540e0145483574b4a09bdcbe964c88.tar.gz
Document MIN_PAYLOAD_SIZE and mark-compact GC mark bits
This updates the documentation of the MIN_PAYLOAD_SIZE constant and adds a new Note [Mark bits in mark-compact collector] explaning why the mark-compact collector uses two bits per objet and why we need MIN_PAYLOAD_SIZE.
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/Constants.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/rts/Constants.h b/includes/rts/Constants.h
index 15ff2a43d9..c2cad8fc80 100644
--- a/includes/rts/Constants.h
+++ b/includes/rts/Constants.h
@@ -22,9 +22,11 @@
/* -----------------------------------------------------------------------------
Minimum closure sizes
- This is the minimum number of words in the payload of a
- heap-allocated closure, so that the closure has enough room to be
- overwritten with a forwarding pointer during garbage collection.
+ This is the minimum number of words in the payload of a heap-allocated
+ closure, so that the closure has two bits in the bitmap for mark-compact
+ collection.
+
+ See Note [Mark bits in mark-compact collector] in rts/sm/Compact.h
-------------------------------------------------------------------------- */
#define MIN_PAYLOAD_SIZE 1