[GHC] #11116: GC reports memory in use way below the actual

GHC ghc-devs at haskell.org
Fri Nov 20 01:21:26 UTC 2015


#11116: GC reports memory in use way below the actual
-------------------------------------+-------------------------------------
        Reporter:                    |                Owner:
  facundo.dominguez                  |
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Runtime System    |              Version:  7.10.2
      Resolution:  invalid           |             Keywords:
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  Runtime           |  (amd64)
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by rwbarton):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 `currentBytesUsed` and `maxBytesUsed` are, as documented, "Current number
 of live bytes" on the heap and "Maximum number of live bytes seen so far"
 respectively. They are just calculated as the sum of the sizes of all live
 objects on the heap. Due to the way GHC's copying garbage collector works,
 the actual space used by the heap will typically be double this size. Then
 of course there will be additional space used by the runtime system or
 other C libraries (though that is not significant in this example).

 `peakMegabytesAllocated` counts everything allocated through the RTS
 (including any blocks used for heap) and will be closer to the figure you
 are looking for.

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


More information about the ghc-tickets mailing list