[Haskell-cafe] Parallel weirdness [new insights]

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun Apr 20 15:51:16 EDT 2008

On Apr 20, 2008, at 15:41 , Andrew Coppin wrote:

> 1. Does running the GC force all threads to stop? I know some GC  
> designs do this, but I have no idea how the one GHC implements works.
> 2. Is the GC still single-threaded? (GHC 6.8.2 here.)

Full GC is single-threaded and stops the entire program, yes.  IIRC  
GHC's runtime tries to do incremental GC to minimize the need for a  
full GC.

> 3. Is there any way for a running Haskell program to find out how  
> much heap space is currently allocated / used / free? I know you  
> can find out how much wall time and CPU time you've used, but I  
> couldn't find anything for RAM usage.

You're looking for "heap profiling" in the GHC manual.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list