gc-0: Poor Richard's Memory Manager

gc-0: Poor Richard's Memory Manager

This package implements a form of Poor Richard's Memory Manager by Hertz, Kane, Keudel, Bai, Ding, Gu and Bard in user-space in GHC.

Usage:

import System.Mem.Manager
main = do
  _ <- selfishManager
  ...

Now, the background thread that was spawned by selfishManager will watch for signs that the host operating system is starting to cause the current process to page out to disk and respond with more aggressive garbage collection.

This empowers your code to try to avoid the inevitable death spiral that follows when GC has to happen with paged out data.

Modules