Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#1334 closed bug (wontfix)

apparent memory leak in --make mode (compiling base library during building ghc)

Reported by: Isaac Dupree Owned by:
Priority: normal Milestone: 6.8.2
Component: Compiler Version: 6.7
Keywords: Cc: claus.reinke@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I've noticed that my memory usage slowly goes up and up, and not down until the ghc-inplace ... --make ... -O ... of all base at once finishes. There is not such a memory reduction between the individual file compilations within the --make. By the end it's using around 200-400 MB of memory. Compiling files individually doesn't seem to have such a large memory occupancy. I could probably gather more details/sureness if it would be useful... for now I am just noting this effect. (I think when I built jhc, which is built using ghc --make, it also ended up using large amounts of memory.) Is the high memory usage just a symptom of importing lots of modules even with separate invocations of ghc, or is ghc remembering more than it needs to in --make mode, or does remembering all the .hi contents at once, of all modules that have been compiled and will be needed sometime in future compilation, take that much memory?

Change History (6)

comment:1 Changed 12 years ago by igloo

Milestone: 6.8

We plan to do a performance sweep for 6.8.

comment:2 Changed 12 years ago by claus

Cc: claus.reinke@… added

comment:3 Changed 12 years ago by simonmar

Resolution: wontfix
Status: newclosed

GHC --make caches interface files as it compiles (which is why --make is faster than separate compilations), so it is perfectly normal for its memory usage to increase during the course of compiling a large set of modules. We looked into it briefly for 6.8.1 and concluded that there was nothing excessive going on. There are always improvements that can be made, but we don't believe there's an actual space leak here.

comment:4 Changed 12 years ago by igloo

Milestone: 6.8 branch6.8.2

comment:5 Changed 11 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:6 Changed 11 years ago by simonmar

Operating System: UnknownUnknown/Multiple
Note: See TracTickets for help on using tickets.