Commit e6f37df5 authored by Anton Bikineev's avatar Anton Bikineev Committed by Chromium LUCI CQ

PartitionAlloc: Remove dead code

The bucket index lookup is now initialized at compile-time.

Change-Id: I13b7d09d88060f35d2f64197b5fbbd59c3102179
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2580798
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834983}
parent ab9840df
......@@ -305,13 +305,6 @@ static void PartitionDumpBucketStats(
} // namespace internal
// TODO(lizeb): Consider making this constexpr. Without C++17 std::array, this
// requires some template magic, only do it if it helps performance.
template <bool thread_safe>
uint16_t PartitionRoot<thread_safe>::bucket_index_lookup[((kBitsPerSizeT + 1) *
kNumBucketsPerOrder) +
1];
template <bool thread_safe>
NOINLINE void PartitionRoot<thread_safe>::OutOfMemory(size_t size) {
#if !defined(ARCH_CPU_64_BITS)
......
......@@ -161,13 +161,6 @@ struct BASE_EXPORT PartitionRoot {
// path of the central allocator.
internal::MaybeSpinLock<thread_safe> lock_;
// The bucket lookup table lets us map a size_t to a bucket quickly.
// The trailing +1 caters for the overflow case for very large allocation
// sizes. It is one flat array instead of a 2D array because in the 2D
// world, we'd need to index array[blah][max+1] which risks undefined
// behavior.
static uint16_t
bucket_index_lookup[((kBitsPerSizeT + 1) * kNumBucketsPerOrder) + 1];
Bucket buckets[kNumBuckets] = {};
Bucket sentinel_bucket;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment