Safe Haskell | None |
---|---|
Language | Haskell2010 |
Definitions used by various garbage collection algorithms.
- splitHeapWith :: GarbageCollectionAlgorithm -> StgState -> (Set MemAddr, Map MemAddr MemAddr, StgState)
- data GarbageCollectionAlgorithm = GarbageCollectionAlgorithm Text (StgState -> (Set MemAddr, Map MemAddr MemAddr, StgState))
- class Addresses a where
- class UpdateAddrs a where
- updateAddrs :: (MemAddr -> MemAddr) -> a -> a
Documentation
splitHeapWith :: GarbageCollectionAlgorithm -> StgState -> (Set MemAddr, Map MemAddr MemAddr, StgState) Source
Split the heap contained in a machine state in three parts: the dead objects that can safely be discarded, a maping from old to new addresses if definitions were moved, and the final state with a cleaned up heap.
class Addresses a where Source
Collect all mentioned addresses in a machine element.
Note that none of the types in Stg.Language contain addresses, since an address is not something present in the STG language, only in the execution contest the language is put in in the Stg.Machine modules.
addrs'
class UpdateAddrs a where Source
Update all contained addresses in a certain value. Useful for moving garbage collectors.
updateAddrs :: (MemAddr -> MemAddr) -> a -> a Source