#3273: memory leak due to optimisation
------------------------------+---------------------------------------------
Reporter: sebf | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.1
Severity: normal | Resolution:
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
------------------------------+---------------------------------------------
Comment (by int-e):
{{{-fno-full-laziness}}} helps actually, but the option must come
''after'' the {{{-O}}} option:
{{{
# ghc_version 6.8.3
# ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.3
# ghc -fforce-recomp condensed.hs -o condensed && /usr/bin/time
./condensed +RTS -M20M
49995000
51.25user 0.18system 0:51.68elapsed 99%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (0major+775minor)pagefaults 0swaps
# ghc -O -fforce-recomp condensed.hs -o condensed && /usr/bin/time
./condensed +RTS -M20M
Heap exhausted;
Current maximum heap size is 19996672 bytes (19 Mb);
use `+RTS -M<size>' to increase it.
Command exited with non-zero status 251
1.88user 0.01system 0:01.92elapsed 99%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (0major+5423minor)pagefaults 0swaps
# ghc -fno-cse -O -fforce-recomp condensed.hs -o condensed &&
/usr/bin/time ./condensed +RTS -M20M
Heap exhausted;
Current maximum heap size is 19996672 bytes (19 Mb);
use `+RTS -M<size>' to increase it.
Command exited with non-zero status 251
1.89user 0.00system 0:01.91elapsed 99%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (0major+5423minor)pagefaults 0swaps
# ghc -O -fno-full-laziness -fforce-recomp condensed.hs -o condensed &&
/usr/bin/time ./condensed +RTS -M20M
49995000
34.84user 0.14system 0:38.53elapsed 90%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (0major+772minor)pagefaults 0swaps
# uname -a
Linux zombie 2.6.28.9 #1 PREEMPT Thu Apr 30 14:58:05 CEST 2009 i686 AMD
Athlon(TM) XP 2500+ AuthenticAMD GNU/Linux
}}}
{{{ghc-6.10.3}}} and HEAD of a week ago exhibit similar behaviour.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3273#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs