summaryrefslogtreecommitdiff
path: root/hadrian/src/Flavour.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2023-05-04 12:14:59 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-05-11 11:56:36 -0400
commit05cea68c0f883999e8fc69edd305906041f44829 (patch)
tree574ed9af99f1c270ca0647423c15442269bde37c /hadrian/src/Flavour.hs
parentad16a0666340723b656879f4c0bb94653363608b (diff)
downloadhaskell-05cea68c0f883999e8fc69edd305906041f44829.tar.gz
rts: Refine memory retention behaviour to account for pinned/compacted objects
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
Diffstat (limited to 'hadrian/src/Flavour.hs')
0 files changed, 0 insertions, 0 deletions