about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2020-05-04 19:25:09 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2020-05-13 11:35:32 +1000
commit40d4868b3949c60de42e400baabe281a00a8c615 (patch)
tree60e3b51b166aa6d4f4364f615e547953b4320209 /src/test/codegen/src-hash-algorithm
parent9111d8b66e013a881bae4e09646514be86ca4c87 (diff)
downloadrust-40d4868b3949c60de42e400baabe281a00a8c615.tar.gz
rust-40d4868b3949c60de42e400baabe281a00a8c615.zip
Be less aggressive with `DroplessArena`/`TypedArena` growth.
`DroplessArena` and `TypedArena` use an aggressive growth strategy: the
first chunk is 4 KiB, the second is 8 KiB, and it keeps on doubling
indefinitely. DHAT profiles show that sometimes this results in large
chunks (e.g. 16-128 MiB) that are barely filled. Although these don't
contribute to RSS, they clog up the DHAT profiles.

This commit changes things so that the doubling stops at 2 MiB. This is
large enough that chunk allocations are still rare (you might get 100s
instead of 10s of them) but avoids lots of unused space in the worst
case. It gives a slight speed-up to cycle counts in some cases.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions