summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-05-06 06:54:09 -0400
committerBen Gamari <ben@smart-cactus.org>2020-12-21 14:58:13 -0500
commitecf52fc5d1e61e73e114c0f45c5c7a65d2f9e7f7 (patch)
treeaac49f8ca6fb5e0a46e613205efa5e5407823346 /rts
parentb4508bd6f8b6492d2e74053d7338980109174861 (diff)
downloadhaskell-ecf52fc5d1e61e73e114c0f45c5c7a65d2f9e7f7.tar.gz
nonmoving: Clarify length of MarkQueueBlock and other comment issues
Diffstat (limited to 'rts')
-rw-r--r--rts/sm/NonMovingMark.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/rts/sm/NonMovingMark.h b/rts/sm/NonMovingMark.h
index 0938e2775a..b8e8494ecc 100644
--- a/rts/sm/NonMovingMark.h
+++ b/rts/sm/NonMovingMark.h
@@ -70,9 +70,17 @@ typedef struct {
// index of first *unused* queue entry
uint32_t head;
+ // MARK_QUEUE_BLOCK_ENTRIES in length.
MarkQueueEnt entries[];
} MarkQueueBlock;
+// Number of blocks to allocate for a mark queue
+#define MARK_QUEUE_BLOCKS 16
+
+// The length of MarkQueueBlock.entries
+#define MARK_QUEUE_BLOCK_ENTRIES ((MARK_QUEUE_BLOCKS * BLOCK_SIZE - sizeof(MarkQueueBlock)) / sizeof(MarkQueueEnt))
+
+
// How far ahead in mark queue to prefetch?
#define MARK_PREFETCH_QUEUE_DEPTH 5
@@ -81,11 +89,11 @@ typedef struct {
* invariants:
*
* a. top == blocks->start;
- * b. there is always a valid MarkQueueChunk, although it may be empty
+ * b. there is always a valid MarkQueueBlock, although it may be empty
* (e.g. top->head == 0).
*/
typedef struct MarkQueue_ {
- // A singly link-list of blocks, each containing a MarkQueueChunk.
+ // A singly link-list of blocks, each containing a MarkQueueBlock.
bdescr *blocks;
// Cached value of blocks->start.
@@ -111,12 +119,6 @@ typedef struct {
MarkQueue queue;
} UpdRemSet;
-// Number of blocks to allocate for a mark queue
-#define MARK_QUEUE_BLOCKS 16
-
-// The length of MarkQueueBlock.entries
-#define MARK_QUEUE_BLOCK_ENTRIES ((MARK_QUEUE_BLOCKS * BLOCK_SIZE - sizeof(MarkQueueBlock)) / sizeof(MarkQueueEnt))
-
extern bdescr *nonmoving_large_objects, *nonmoving_marked_large_objects,
*nonmoving_compact_objects, *nonmoving_marked_compact_objects;
extern memcount n_nonmoving_large_blocks, n_nonmoving_marked_large_blocks,