diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-07-06 06:30:40 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-09-22 15:18:10 +0200 |
commit | 52c5ea71515df9fa655de8c94ec75510f417362e (patch) | |
tree | 956fc465059f263cff225d01d258daa8bacaec6e /rts/TraverseHeap.h | |
parent | 383f9089eea7f9228513260ad0f7215938cd4b31 (diff) | |
download | haskell-52c5ea71515df9fa655de8c94ec75510f417362e.tar.gz |
rts: TraverseHeap: Make comment style consistent
Diffstat (limited to 'rts/TraverseHeap.h')
-rw-r--r-- | rts/TraverseHeap.h | 82 |
1 files changed, 43 insertions, 39 deletions
diff --git a/rts/TraverseHeap.h b/rts/TraverseHeap.h index ad1135519c..78bcd4e8a7 100644 --- a/rts/TraverseHeap.h +++ b/rts/TraverseHeap.h @@ -36,49 +36,53 @@ typedef union stackData_ { typedef struct stackElement_ stackElement; typedef struct traverseState_ { -/* - Invariants: - - firstStack points to the first block group. - - currentStack points to the block group currently being used. - - currentStack->free == stackLimit. - - stackTop points to the topmost byte in the stack of currentStack. - - Unless the whole stack is empty, stackTop must point to the topmost - object (or byte) in the whole stack. Thus, it is only when the whole stack - is empty that stackTop == stackLimit (not during the execution of - pushStackElement() and popStackElement()). - - stackBottom == currentStack->start. - - stackLimit == currentStack->start + BLOCK_SIZE_W * currentStack->blocks. - - - Note: - - When a current stack becomes empty, stackTop is set to point to - the topmost element on the previous block group so as to satisfy - the invariants described above. - */ + /** + * Invariants: + * + * firstStack points to the first block group. + * + * currentStack points to the block group currently being used. + * + * currentStack->free == stackLimit. + * + * stackTop points to the topmost byte in the stack of currentStack. + * + * Unless the whole stack is empty, stackTop must point to the topmost + * object (or byte) in the whole stack. Thus, it is only when the whole + * stack is empty that stackTop == stackLimit (not during the execution + * of pushStackElement() and popStackElement()). + * + * stackBottom == currentStack->start. + * + * stackLimit + * == currentStack->start + BLOCK_SIZE_W * currentStack->blocks. + * + * Note: + * + * When a current stack becomes empty, stackTop is set to point to + * the topmost element on the previous block group so as to satisfy + * the invariants described above. + */ bdescr *firstStack; bdescr *currentStack; stackElement *stackBottom, *stackTop, *stackLimit; -/* - stackSize records the current size of the stack. - maxStackSize records its high water mark. - Invariants: - stackSize <= maxStackSize - Note: - stackSize is just an estimate measure of the depth of the graph. The reason - is that some heap objects have only a single child and may not result - in a new element being pushed onto the stack. Therefore, at the end of - retainer profiling, maxStackSize is some value no greater - than the actual depth of the graph. - */ + /** + * stackSize: records the current size of the stack. + * maxStackSize: records its high water mark. + * + * Invariants: + * + * stackSize <= maxStackSize + * + * Note: + * + * stackSize is just an estimate measure of the depth of the graph. The + * reason is that some heap objects have only a single child and may not + * result in a new element being pushed onto the stack. Therefore, at the + * end of retainer profiling, maxStackSize is some value no greater than + * the actual depth of the graph. + */ int stackSize, maxStackSize; } traverseState; |