Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Matthew Pickering's avatar
    05cea68c
    rts: Refine memory retention behaviour to account for pinned/compacted objects · 05cea68c
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    When using the copying collector there is still a lot of data which
    isn't copied (such as pinned, compacted, large objects etc). The logic
    to decide how much memory to retain didn't take into account that these
    wouldn't be copied. Therefore we pessimistically retained 2* the amount
    of memory for these blocks even though they wouldn't be copied by the
    collector.
    
    The solution is to split up the heap into two parts, the parts which
    will be copied and the parts which won't be copied. Then the appropiate
    factor is applied to each part individually (2 * for copying and 1.2 *
    for not copying).
    
    The T23221 test demonstrates this improvement with a program which first
    allocates many unpinned ByteArray# followed by many pinned ByteArray#
    and observes the difference in the ultimate memory baseline between the
    two.
    
    There are some charts on #23221.
    
    Fixes #23221
    05cea68c
    History
    rts: Refine memory retention behaviour to account for pinned/compacted objects
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    When using the copying collector there is still a lot of data which
    isn't copied (such as pinned, compacted, large objects etc). The logic
    to decide how much memory to retain didn't take into account that these
    wouldn't be copied. Therefore we pessimistically retained 2* the amount
    of memory for these blocks even though they wouldn't be copied by the
    collector.
    
    The solution is to split up the heap into two parts, the parts which
    will be copied and the parts which won't be copied. Then the appropiate
    factor is applied to each part individually (2 * for copying and 1.2 *
    for not copying).
    
    The T23221 test demonstrates this improvement with a program which first
    allocates many unpinned ByteArray# followed by many pinned ByteArray#
    and observes the difference in the ultimate memory baseline between the
    two.
    
    There are some charts on #23221.
    
    Fixes #23221
Code owners
Assign users and groups as approvers for specific file changes. Learn more.