Lines Matching refs:units
91 slobidx_t units; member
151 s[0].units = size; in set_slob()
152 s[1].units = offset; in set_slob()
154 s[0].units = -offset; in set_slob()
162 if (s->units > 0) in slob_units()
163 return s->units; in slob_units()
175 if (s[0].units < 0) in slob_next()
176 next = -s[0].units; in slob_next()
178 next = s[1].units; in slob_next()
220 int delta = 0, units = SLOB_UNITS(size); in slob_page_alloc() local
229 if (avail >= units + delta) { /* room enough? */ in slob_page_alloc()
242 if (avail == units) { /* exact fit? unlink. */ in slob_page_alloc()
249 set_slob(prev, slob_units(prev), cur + units); in slob_page_alloc()
251 sp->freelist = cur + units; in slob_page_alloc()
252 set_slob(cur + units, avail - units, next); in slob_page_alloc()
255 sp->units -= units; in slob_page_alloc()
256 if (!sp->units) in slob_page_alloc()
295 if (sp->units < SLOB_UNITS(size)) in slob_alloc()
323 sp->units = SLOB_UNITS(PAGE_SIZE); in slob_alloc()
344 slobidx_t units; in slob_free() local
353 units = SLOB_UNITS(size); in slob_free()
357 if (sp->units + units == SLOB_UNITS(PAGE_SIZE)) { in slob_free()
370 sp->units = units; in slob_free()
372 set_slob(b, units, in slob_free()
389 sp->units += units; in slob_free()
392 if (b + units == sp->freelist) { in slob_free()
393 units += slob_units(sp->freelist); in slob_free()
396 set_slob(b, units, sp->freelist); in slob_free()
406 if (!slob_last(prev) && b + units == next) { in slob_free()
407 units += slob_units(next); in slob_free()
408 set_slob(b, units, slob_next(next)); in slob_free()
410 set_slob(b, units, next); in slob_free()
413 units = slob_units(b) + slob_units(prev); in slob_free()
414 set_slob(prev, units, slob_next(b)); in slob_free()