[Haskell-cafe] ghc leaking memory?

Joachim Breitner nomeata at debian.org
Sat Mar 6 12:57:16 EST 2010


in Debian, we are having some problems building large libraries (such as
agda, highlighting-kate, xmonad-contrib) on weaker architectures (sparc,
armel, s390) which compile with -fvia-C, especially when building the
profiling libraries.

In the case of highlighting-kate, there were really issues with the
code: A huge list of words which ghc seemed to try to inline caused it
consuming a lot of memory.

But in the case of agda, it even fails with relatively small modules:

Now, looking at the memory gauge on my computer while compiling such a
program with Cabal (which compiles all modules in one ghc call), it
looks like it is steadily increasing. I’d expect ghc to free a lot of
memory when it is done with a module, but this does not seem to be the

Is this a bug (i.e. memory leak) in ghc or expected behavior?

Is there a way to make Cabal build each module on its own?

Are there any fixes or work-arounds?


Joachim "nomeata" Breitner
Debian Developer
  nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100306/650293cc/attachment.bin

More information about the Haskell-Cafe mailing list