Commit 4097c850 authored by verwaest's avatar verwaest Committed by Commit bot

[zone] Fix zone segment pooling size limits

BUG=chromium:655129

Review-Url: https://codereview.chromium.org/2520903002
Cr-Commit-Position: refs/heads/master@{#41138}
parent 2405ab11
......@@ -59,7 +59,8 @@ void AccountingAllocator::ConfigureSegmentPool(const size_t max_pool_size) {
size_t total_size = fits_fully * full_size;
for (size_t power = 0; power < kNumberBuckets; ++power) {
if (total_size + (size_t(1) << power) <= max_pool_size) {
if (total_size + (size_t(1) << (power + kMinSegmentSizePower)) <=
max_pool_size) {
unused_segments_max_sizes_[power] = fits_fully + 1;
total_size += size_t(1) << power;
} else {
......
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