Word offset, or word count
Moduleghc-9.10.3GHC2021
GHC.Runtime.Heap.Layout
- 10 types
- 48 values
- Packageghc-9.10.3
- Exports58
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceLayout.hs
Words and bytes
14 declarationsByte offset, or byte count
Convert the given number of words to a number of bytes.
This function morally has type WordOff -> ByteOff, but uses Num
a to allow for overloading.
First round the given byte count up to a multiple of the machine's word size and then convert the result to words.
Round up the given byte count to the next byte count that's a multiple of the machine's word size.
Round up base to a multiple of size.
Instances2Eq, Outputable
Eq StgHalfWordDefined in ghc-9.10.3 · GHC.Runtime.Heap.LayoutOutputable StgHalfWordDefined in ghc-9.10.3 · GHC.Runtime.Heap.Layout
Half word size in bytes
Closure representation
6 declarationsA description of the layout of a closure. Corresponds directly to the closure types in includes/rts/storage/ClosureTypes.h.
True <=> This is a static closure. Affects how we garbage-collect it. Static closure have an extra static link field at the end. Constructors do not have a static variant; see Note [static constructors]
Constructors
Constr ConTagZ ConstrDescriptionFun FunArity ArgDescrThunkThunkSelector SelectorOffsetBlackHoleIndStatic
Instances3Eq, Ord, Outputable
Eq ClosureTypeInfoDefined in ghc-9.10.3 · GHC.Runtime.Heap.LayoutOrd ClosureTypeInfoDefined in ghc-9.10.3 · GHC.Runtime.Heap.LayoutOutputable ClosureTypeInfoDefined in ghc-9.10.3 · GHC.Runtime.Heap.Layout
An ArgDescr describes the argument pattern of a function
Constructors
We represent liveness bitmaps as a Bitmap (whose internal representation really is a bitmap). These are pinned onto case return vectors to indicate the state of the stack for the garbage collector.
In the compiled program, liveness bitmaps that fit inside a single word (StgWord) are stored as a single word, while larger bitmaps are stored as a pointer to an array of words.
Construction
Predicates
Size-related things
The total size of the closure, in words.
Size of a closure header (StgHeader in includes/rts/storage/Closures.h)
Size of the profiling part of a closure header (StgProfHeader in includes/rts/storage/Closures.h)
RTS closure types
Derives the RTS closure type from an SMRep
Arrays
The byte offset into the card table of the card for a given element
Convert a number of elements to a number of cards, rounding up
The size of a card table, in bytes
The size of a card table, in words