The gc package

[Tags:bsd3, library]

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.


 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.

[Skip to Readme]


Versions 0
Change log CHANGELOG.markdown
Dependencies base (>=4.7 && <5) [details]
License BSD3
Copyright Copyright (C) 2015 Edward A. Kmett
Author Edward A. Kmett
Maintainer Edward A. Kmett <>
Category Data
Home page
Bug tracker
Source repository head: git clone git://
Uploaded Wed Sep 16 04:54:30 UTC 2015 by EdwardKmett
Distributions NixOS:0
Downloads 122 total (3 in the last 30 days)
1 []
Status Docs uploaded by user
Build status unknown [no reports yet]





Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for gc

Readme for gc-0


Build Status

Experimenting with building Poor Richard's Memory Manager in Haskell user space.


import System.Mem.Manager

main = do
  _ <- selfishManager

Now an oracle will look for signs of memory pressure from the host operating system and attempt more aggressive garbage collection in response.

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on

-Edward Kmett