Lines Matching refs:buckets
26 // Possibly empty buckets (buckets that do not contain any slots) are discovered
28 // or in another thread, so all those buckets need to be revisited.
29 // Track possibly empty buckets within a SlotSet in this data structure. The
58 void Insert(size_t bucket_index, size_t buckets) {
64 Allocate(buckets);
92 void Allocate(size_t buckets) {
94 size_t words = WordsForBuckets(buckets);
113 static size_t WordsForBuckets(size_t buckets) {
114 return (buckets + kBitsPerWord - 1) / kBitsPerWord;
131 // splits the valid slot offset range into buckets.
142 static SlotSet* Allocate(size_t buckets) {
147 // | initial buckets | buckets array |
149 // pointer-sized pointer-sized * buckets
152 // The SlotSet pointer points to the beginning of the buckets array for
153 // faster access in the write barrier. The number of buckets is needed for
155 size_t buckets_size = buckets * sizeof(Bucket*);
163 *slot_set->initial_buckets() = buckets;
165 for (size_t i = 0; i < buckets; i++) {
171 static void Delete(SlotSet* slot_set, size_t buckets) {
174 for (size_t i = 0; i < buckets; i++) {
181 for (size_t i = buckets; i < initial_buckets; i++) {
201 // AccessMode defines whether there can be concurrent access on the buckets
254 void RemoveRange(size_t start_offset, size_t end_offset, size_t buckets,
256 CHECK_LE(end_offset, buckets * kBitsPerBucket * kTaggedSize);
304 // All buckets between start_bucket and end_bucket are cleared.
306 if (current_bucket == buckets) return;
343 // Releases memory for empty buckets with FREE_EMPTY_BUCKETS.
355 // Similar to Iterate but marks potentially empty buckets internally. Stores
369 bool FreeEmptyBuckets(size_t buckets) {
371 for (size_t bucket_index = 0; bucket_index < buckets; bucket_index++) {
380 // Check whether possibly empty buckets are really empty. Empty buckets are
381 // freed and the possibly empty state is cleared for all buckets.
382 bool CheckPossiblyEmptyBuckets(size_t buckets,
385 for (size_t bucket_index = 0; bucket_index < buckets; bucket_index++) {
591 Bucket** buckets() { return reinterpret_cast<Bucket**>(this); }
592 Bucket** bucket(size_t bucket_index) { return buckets() + bucket_index; }