[base/allocator] Make constants in PartitionRoot constexpr.
PartitionRoot precomputes constants that are needed in the hot path, to save branches. These constants are the same across all PartitionRoots, and they could be known at compile-time. This CL precomputes these at compile time, which saves ~1kiB per PartitionRoot, and should improve cache locality, as we have multiple partitions in use at any point. Bug: 998048 Change-Id: I36ff92b8df684c7788a1ffee7cfb160d3e4cc98b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2375248 Commit-Queue: Benoit L <lizeb@chromium.org> Reviewed-by:Bartek Nowierski <bartekn@chromium.org> Cr-Commit-Position: refs/heads/master@{#804886}
Showing
Please register or sign in to comment