[GHC] #7831: Bad fragmentation when allocating many large objects

GHC ghc-devs at haskell.org
Wed Nov 6 09:24:02 UTC 2013


#7831: Bad fragmentation when allocating many large objects
-------------------------------------+------------------------------------
        Reporter:  ezyang            |            Owner:  ezyang
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:  7.8.1
       Component:  Runtime System    |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------
Changes (by simonmar):

 * cc: simonmar (added)


Comment:

 josef: O'Caml is a bit different, the situation there is fragmentation in
 the heap itself because the old-generation collector doesn't move objects.
 We don't have that issue in GHC, at least for small objects, but there's a
 related issue in the layer beneath the GC (the block allocator) that
 Edward's program nicely illustrates here.

 I doubt this is ever an issue in practice.  The fragmentation that arises
 this way is bounded: at worst the fragmentation will be equal to the
 amount of memory used for large objects.  And in most cases (a) it will be
 less than this because the sizes of large objects are never exactly 0.5MB,
 and (b) the fragmented space will be used to store small objects, so it
 won't be wasted.

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


More information about the ghc-tickets mailing list