haskell-cafe@haskell.org
[Top] [All Lists]

[Haskell-cafe] ghc leaking memory?

Subject: [Haskell-cafe] ghc leaking memory?
From: Joachim Breitner
Date: Sat, 06 Mar 2010 18:57:16 +0100
Hi,

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:
https://buildd.debian.org/fetch.cgi?pkg=agda&arch=sparc&ver=2.2.6-3&stamp=1267334936&file=log&as=raw

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
case.

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?

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@xxxxxxxxxx | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@xxxxxxxxxxxxxxxxxxx | http://people.debian.org/~nomeata
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe
<Prev in Thread] Current Thread [Next in Thread>