Lines Matching refs:power
61 for (size_t power = 0; power < kNumberBuckets; ++power) { in ConfigureSegmentPool() local
62 if (total_size + (size_t(1) << (power + kMinSegmentSizePower)) <= in ConfigureSegmentPool()
64 unused_segments_max_sizes_[power] = fits_fully + 1; in ConfigureSegmentPool()
65 total_size += size_t(1) << power; in ConfigureSegmentPool()
67 unused_segments_max_sizes_[power] = fits_fully; in ConfigureSegmentPool()
131 size_t power = kMinSegmentSizePower; in GetSegmentFromPool() local
132 while (requested_size > (static_cast<size_t>(1) << power)) power++; in GetSegmentFromPool()
134 DCHECK_GE(power, kMinSegmentSizePower + 0); in GetSegmentFromPool()
135 power -= kMinSegmentSizePower; in GetSegmentFromPool()
141 segment = unused_segments_heads_[power]; in GetSegmentFromPool()
144 unused_segments_heads_[power] = segment->next(); in GetSegmentFromPool()
147 unused_segments_sizes_[power]--; in GetSegmentFromPool()
166 size_t power = kMaxSegmentSizePower; in AddSegmentToPool() local
168 while (size < (static_cast<size_t>(1) << power)) power--; in AddSegmentToPool()
170 DCHECK_GE(power, kMinSegmentSizePower + 0); in AddSegmentToPool()
171 power -= kMinSegmentSizePower; in AddSegmentToPool()
176 if (unused_segments_sizes_[power] >= unused_segments_max_sizes_[power]) { in AddSegmentToPool()
180 segment->set_next(unused_segments_heads_[power]); in AddSegmentToPool()
181 unused_segments_heads_[power] = segment; in AddSegmentToPool()
183 unused_segments_sizes_[power]++; in AddSegmentToPool()
192 for (size_t power = 0; power <= kMaxSegmentSizePower - kMinSegmentSizePower; in ClearPool() local
193 power++) { in ClearPool()
194 Segment* current = unused_segments_heads_[power]; in ClearPool()
200 unused_segments_heads_[power] = nullptr; in ClearPool()