[GHC] #10812: High memory usage after performing GC

GHC ghc-devs at haskell.org
Thu Dec 1 22:14:13 UTC 2016


#10812: High memory usage after performing GC
---------------------------------+--------------------------------------
        Reporter:  danilo2       |                Owner:
            Type:  bug           |               Status:  new
        Priority:  high          |            Milestone:
       Component:  Compiler      |              Version:  7.10.2
      Resolution:                |             Keywords:
Operating System:  MacOS X       |         Architecture:  x86_64 (amd64)
 Type of failure:  None/Unknown  |            Test Case:
      Blocked By:                |             Blocking:
 Related Tickets:                |  Differential Rev(s):
       Wiki Page:                |
---------------------------------+--------------------------------------
Changes (by bgamari):

 * cc: simonmar (added)


Comment:

 > I've tried running performGC manually (please look again in my code -
 I've tried all the versions commented out above).

 Ahh, sorry for the misunderstanding.


 > So I've got 2 questions: 1) Maybe it is Mac OS X related bug?

 Given Kazu's observation I guess we can rule this out.

 > 2) You've told me that GC is performed only when memory is allocated, so
 when we are performing MapM ten million times, allocating each time a
 small chunk of memory (and returning weak pointers only), shouldn't the GC
 be called at last several times then?

 Ahh, yes, you are right; the `mapM` does need to build its result and will
 therefore allocate and therefore garbage collect.

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


More information about the ghc-tickets mailing list