Lines Matching refs:power

63   for (size_t power = 0; power < kNumberBuckets; ++power) {  in ConfigureSegmentPool()  local
64 if (total_size + (size_t(1) << (power + kMinSegmentSizePower)) <= in ConfigureSegmentPool()
66 unused_segments_max_sizes_[power] = fits_fully + 1; in ConfigureSegmentPool()
67 total_size += size_t(1) << power; in ConfigureSegmentPool()
69 unused_segments_max_sizes_[power] = fits_fully; in ConfigureSegmentPool()
133 size_t power = kMinSegmentSizePower; in GetSegmentFromPool() local
134 while (requested_size > (static_cast<size_t>(1) << power)) power++; in GetSegmentFromPool()
136 DCHECK_GE(power, kMinSegmentSizePower + 0); in GetSegmentFromPool()
137 power -= kMinSegmentSizePower; in GetSegmentFromPool()
143 segment = unused_segments_heads_[power]; in GetSegmentFromPool()
146 unused_segments_heads_[power] = segment->next(); in GetSegmentFromPool()
149 unused_segments_sizes_[power]--; in GetSegmentFromPool()
168 size_t power = kMaxSegmentSizePower; in AddSegmentToPool() local
170 while (size < (static_cast<size_t>(1) << power)) power--; in AddSegmentToPool()
172 DCHECK_GE(power, kMinSegmentSizePower + 0); in AddSegmentToPool()
173 power -= kMinSegmentSizePower; in AddSegmentToPool()
178 if (unused_segments_sizes_[power] >= unused_segments_max_sizes_[power]) { in AddSegmentToPool()
182 segment->set_next(unused_segments_heads_[power]); in AddSegmentToPool()
183 unused_segments_heads_[power] = segment; in AddSegmentToPool()
185 unused_segments_sizes_[power]++; in AddSegmentToPool()
194 for (size_t power = 0; power <= kMaxSegmentSizePower - kMinSegmentSizePower; in ClearPool() local
195 power++) { in ClearPool()
196 Segment* current = unused_segments_heads_[power]; in ClearPool()
202 unused_segments_heads_[power] = nullptr; in ClearPool()