diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/storage/Block.h | 32 | ||||
-rw-r--r-- | includes/rts/storage/GC.h | 7 |
2 files changed, 25 insertions, 14 deletions
diff --git a/includes/rts/storage/Block.h b/includes/rts/storage/Block.h index 849f99f430..e99a03e76c 100644 --- a/includes/rts/storage/Block.h +++ b/includes/rts/storage/Block.h @@ -48,22 +48,26 @@ #ifndef CMINUSMINUS typedef struct bdescr_ { - StgPtr start; /* start addr of memory */ - StgPtr free; /* first free byte of memory */ - struct bdescr_ *link; /* used for chaining blocks together */ - union { - struct bdescr_ *back; /* used (occasionally) for doubly-linked lists*/ - StgWord *bitmap; - StgPtr scan; /* scan pointer for copying GC */ - } u; - unsigned int gen_no; /* generation */ - struct step_ *step; /* step */ - StgWord32 blocks; /* no. of blocks (if grp head, 0 otherwise) */ - StgWord32 flags; /* block is in to-space */ + StgPtr start; /* start addr of memory */ + StgPtr free; /* first free byte of memory */ + struct bdescr_ *link; /* used for chaining blocks together */ + union { + struct bdescr_ *back; /* used (occasionally) for doubly-linked lists*/ + StgWord *bitmap; + StgPtr scan; /* scan pointer for copying GC */ + } u; + + struct step_ *step; /* step */ + struct step_ *dest; /* destination step */ + + StgWord32 blocks; /* no. of blocks (if grp head, 0 otherwise) */ + + StgWord16 gen_no; + StgWord16 flags; /* block flags, see below */ #if SIZEOF_VOID_P == 8 - StgWord32 _padding[2]; + StgWord32 _padding[2]; #else - StgWord32 _padding[0]; + StgWord32 _padding[0]; #endif } bdescr; #endif diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h index b30582dfd7..aa0531382f 100644 --- a/includes/rts/storage/GC.h +++ b/includes/rts/storage/GC.h @@ -214,4 +214,11 @@ void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p); /* (needed when dynamic libraries are used). */ extern rtsBool keepCAFs; +INLINE_HEADER void initBdescr(bdescr *bd, step *step) +{ + bd->step = step; + bd->gen_no = step->gen_no; + bd->dest = step->to; +} + #endif /* RTS_STORAGE_GC_H */ |