Lines Matching refs:levels

77     int levels;           // levels in skiplist used
78 AllocList *next[kMaxLevel]; // actually has levels elements.
115 // Return a number of skiplist levels for a node of size bytes, where
119 // Bigger nodes tend to have more skiplist levels due to the log2(size / base)
124 // max_fit is the maximum number of levels that will fit in a node for the
136 // For 0 <= i < head->levels, set prev[i] to "no_greater", where no_greater
142 for (int level = head->levels - 1; level >= 0; level--) {
147 return (head->levels == 0) ? 0 : prev[0]->next[0];
151 // Requires that e->levels be previously set by the caller (using
156 for (; head->levels < e->levels; head->levels++) { // extend prev pointers
157 prev[head->levels] = head; // to all *e's levels
159 for (int i = 0; i != e->levels; i++) { // add element to list
166 // Requires that e->levels be previous set by the caller (using
172 for (int i = 0; i != e->levels && prev[i]->next[i] == e; i++) {
175 while (head->levels > 0 && head->next[head->levels - 1] == 0) {
176 head->levels--; // reduce head->levels if level unused
278 arena->freelist.levels = 0;
362 RAW_CHECK(i < prev->levels, "too few levels in Next()");
390 a->levels = LLA_SkiplistLevels(a->header.size, arena->min_size, true);
404 f->levels = LLA_SkiplistLevels(f->header.size, arena->min_size, true);
443 // find the minimum levels that a block of this size must have
445 if (i < arena->freelist.levels) { // potential blocks exist
475 AddToFreelist(&s->levels, arena); // insert new region into free list
487 AddToFreelist(&n->levels, arena);
493 result = &s->levels;