summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-05-17 13:28:53 -0400
committerBen Gamari <ben@smart-cactus.org>2019-10-22 12:20:37 -0400
commit6dcef5eedaee9a9ecd8b0e41c5f5b93512e6f6c9 (patch)
treed02a9969660658505c9d36488886942fa68838a0 /includes
parentc936a245e723f2ffdbfcb29432cf7131146fbbe3 (diff)
downloadhaskell-6dcef5eedaee9a9ecd8b0e41c5f5b93512e6f6c9.tar.gz
NonMoving: Move block size to block descriptor
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/storage/Block.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/includes/rts/storage/Block.h b/includes/rts/storage/Block.h
index 32cf98958f..3887ac2980 100644
--- a/includes/rts/storage/Block.h
+++ b/includes/rts/storage/Block.h
@@ -88,17 +88,22 @@ typedef struct bdescr_ {
StgPtr start; // [READ ONLY] start addr of memory
- StgPtr free; // First free byte of memory.
- // allocGroup() sets this to the value of start.
- // NB. during use this value should lie
- // between start and start + blocks *
- // BLOCK_SIZE. Values outside this
- // range are reserved for use by the
- // block allocator. In particular, the
- // value (StgPtr)(-1) is used to
- // indicate that a block is unallocated.
- //
- // Unused by the non-moving allocator.
+ union {
+ StgPtr free; // First free byte of memory.
+ // allocGroup() sets this to the value of start.
+ // NB. during use this value should lie
+ // between start and start + blocks *
+ // BLOCK_SIZE. Values outside this
+ // range are reserved for use by the
+ // block allocator. In particular, the
+ // value (StgPtr)(-1) is used to
+ // indicate that a block is unallocated.
+ //
+ // Unused by the non-moving allocator.
+ struct NonmovingSegmentInfo {
+ StgWord8 log_block_size;
+ } nonmoving_segment;
+ };
struct bdescr_ *link; // used for chaining blocks together