about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/graph.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-18 11:19:14 +0000
committerbors <bors@rust-lang.org>2020-10-18 11:19:14 +0000
commit98e16884b10630e6e6ef5f4a076af3409122401d (patch)
treeccf0c7111e954380200358f8394553cb63a8165c /compiler/rustc_mir/src/transform/coverage/graph.rs
parentad268bd63894953ab7038f082aa744d6a832639b (diff)
parent396561bdb7a5038c9a277b4bb318305b71a7b8d0 (diff)
downloadrust-98e16884b10630e6e6ef5f4a076af3409122401d.tar.gz
rust-98e16884b10630e6e6ef5f4a076af3409122401d.zip
Auto merge of #78058 - bugadani:arena2, r=lcnr
Make sure arenas don't allocate bigger than HUGE_PAGE

Right now, arenas allocate based on the size of the last chunk. It is possible for a `grow` call to allocate a chunk that is not a multiple of `PAGE`, and this size is doubled for each subsequent allocation. This means, instead of `HUGE_PAGE`, the biggest page possible is actually unknown.

This change fixes this, and also removes an unnecessary checked multiplication. It is still possible to allocate bigger than `HUGE_PAGE` pages, but this will only happen as many times as absolutely necessary.
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/graph.rs')
0 files changed, 0 insertions, 0 deletions