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 two parts: the dead objects that can safely be discarded, and the alive ones that are still needed by the program.
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