threadDelay space leak under win32

Simon Marlow simonmar at microsoft.com
Mon Nov 8 10:54:07 EST 2004


On 07 November 2004 22:47, Philippa Cowderoy wrote:

> Using the binary distros of GHC 6.2.1 and 6.2.2 under Win2K, this
> leaks 12K of memory per second on my machine (as do larger programs
> using threadDelay in the idle event of a wxHaskell app):
> 
> module Main where
> import Control.Concurrent
> main = (threadDelay 1000) >> main
> 
> I've no idea if it also happens on *nix platforms, or with a
> win32/cygwin build.

Yes, that looks like a memory leak somewhere in the Async IO subsystem
on Windows.  The leak goes away using the threaded RTS on the latest CVS
version of GHC, because there we're using plain sleep() calls to
implement threadDelay and bypassing AsyncIO.

Sigbjorn: you're the owner of the Windows AsyncIO implementation, care
to look into this leak?

Cheers,
	Simon



More information about the Glasgow-haskell-bugs mailing list