Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1202)

Unified Diff: src/zone/accounting-allocator.cc

Issue 2520903002: [zone] Fix zone segment pooling size limits (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone/accounting-allocator.cc
diff --git a/src/zone/accounting-allocator.cc b/src/zone/accounting-allocator.cc
index 60f8fc02fdb75755503cc3f84d8a0175c221bdc1..587e09d585e6e0e445dc7c5a7f26e4b4d03d9829 100644
--- a/src/zone/accounting-allocator.cc
+++ b/src/zone/accounting-allocator.cc
@@ -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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698