HomePhabricator

[scudo][standalone] Allow the release of smaller sizes

Authored by cryptoad on Dec 11 2020, 2:04 PM.

Description

[scudo][standalone] Allow the release of smaller sizes

Initially we were avoiding the release of smaller size classes due to
the fact that it was an expensive operation, particularly on 32-bit
platforms. With a lot of batches, and given that there are a lot of
blocks per page, this was a lengthy operation with little results.

There has been some improvements since then to the 32-bit release,
and we still have some criterias preventing us from wasting time
(eg, 9x% free blocks in the class size, etc).

Allowing to release blocks < 128 bytes helps in situations where a lot
of small chunks would not have been reclaimed if not for a forced
reclaiming.

Additionally change some CHECK to DCHECK and rearrange a bit the
code.

I didn't experience any regressions in my benchmarks.

Differential Revision: https://reviews.llvm.org/D93141

Details

Committed
cryptoadDec 17 2020, 10:01 AM
Differential Revision
D93141: [scudo][standalone] Allow the release of smaller sizes
Parents
rG4a327bd25289: Add call site location getter to C API
Branches
Unknown
Tags
Unknown