[GHC] #13110: GHC API allocates memory which is never GC'd

GHC ghc-devs at haskell.org
Fri Feb 17 15:16:52 UTC 2017


#13110: GHC API allocates memory which is never GC'd
-------------------------------------+-------------------------------------
        Reporter:  DanielG           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  GHC API           |              Version:  8.0.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 You should at least run the GC once if you want to return memory to the
 OS, it doesn't happen magically.

 If I add a `rts_performMajorGC` after `print "done"` then the stable heap
 usage of the program reduces to about 110MB. I think it's more or less
 attributable to the actual 20MB heap usage plus ghc's conservatism in
 returning memory to the OS (since it will likely just need it again
 later). I'm not sure where the 20MB leak is coming from, it's apparently a
 list of `FastString`s but that doesn't narrow it down very much...

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13110#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list