diff options
author | Fabian Thorand <fabian@channable.com> | 2020-10-14 14:04:24 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-29 09:40:51 -0400 |
commit | be77a9e07d9f77af48fd9defd92de85560d884c0 (patch) | |
tree | 5b9d6cfd4fa4e2113fded30136314306b1f68f98 /rts/Ticky.c | |
parent | b8d98827d73fd3e49867cab09f9440fc8c311bfe (diff) | |
download | haskell-be77a9e07d9f77af48fd9defd92de85560d884c0.tar.gz |
Remove special case for large objects in allocateForCompact
allocateForCompact() is called when the current allocation for the
compact region does not fit in the nursery. It previously had a special
case for objects exceeding the large object threshold. In that case, it
would allocate a new compact region block just for that object. That led
to a lot of small blocks being allocated in compact regions with a
larger default block size (`autoBlockW`).
This commit removes this special case because having a lot of small
compact region blocks contributes significantly to memory fragmentation.
The removal should be valid because
- a more generic case for allocating a new compact region block follows
at the end of allocateForCompact(), and that one takes `autoBlockW`
into account
- the reason for allocating separate blocks for large objects in the
main heap seems to be to avoid copying during GCs, but once inside
the compact region, the object will never be copied anyway.
Fixes #18757.
A regression test T18757 was added.
Diffstat (limited to 'rts/Ticky.c')
0 files changed, 0 insertions, 0 deletions