summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2020-01-26 09:29:57 (GMT)
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-27 15:04:19 (GMT)
commit97d0b0a367e4c6a52a17c3299439ac7de129da24 (patch)
treeac71f946252011fe0ac7674d64c3cab2cace369c
parent1132602f764ef4694b52abeaeeaa8da544915134 (diff)
downloadghc-97d0b0a367e4c6a52a17c3299439ac7de129da24.zip
ghc-97d0b0a367e4c6a52a17c3299439ac7de129da24.tar.gz
ghc-97d0b0a367e4c6a52a17c3299439ac7de129da24.tar.bz2
Make Block.h compile with c++ compilers
-rw-r--r--includes/rts/storage/Block.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/includes/rts/storage/Block.h b/includes/rts/storage/Block.h
index 4afc368..626cddb 100644
--- a/includes/rts/storage/Block.h
+++ b/includes/rts/storage/Block.h
@@ -84,10 +84,18 @@
// freely modified.
#if !defined(CMINUSMINUS)
+
+
+struct NonmovingSegmentInfo {
+ StgWord8 log_block_size;
+ StgWord16 next_free_snap;
+};
+
typedef struct bdescr_ {
StgPtr start; // [READ ONLY] start addr of memory
+
union {
StgPtr free; // First free byte of memory.
// allocGroup() sets this to the value of start.
@@ -100,10 +108,7 @@ typedef struct bdescr_ {
// indicate that a block is unallocated.
//
// Unused by the non-moving allocator.
- struct NonmovingSegmentInfo {
- StgWord8 log_block_size;
- StgWord16 next_free_snap;
- } nonmoving_segment;
+ struct NonmovingSegmentInfo nonmoving_segment;
};
struct bdescr_ *link; // used for chaining blocks together