Lines Matching refs:units

92 	slobidx_t units;  member
152 s[0].units = size; in set_slob()
153 s[1].units = offset; in set_slob()
155 s[0].units = -offset; in set_slob()
163 if (s->units > 0) in slob_units()
164 return s->units; in slob_units()
176 if (s[0].units < 0) in slob_next()
177 next = -s[0].units; in slob_next()
179 next = s[1].units; in slob_next()
241 int delta = 0, units = SLOB_UNITS(size); in slob_page_alloc() local
260 if (avail >= units + delta) { /* room enough? */ in slob_page_alloc()
273 if (avail == units) { /* exact fit? unlink. */ in slob_page_alloc()
280 set_slob(prev, slob_units(prev), cur + units); in slob_page_alloc()
282 sp->freelist = cur + units; in slob_page_alloc()
283 set_slob(cur + units, avail - units, next); in slob_page_alloc()
286 sp->units -= units; in slob_page_alloc()
287 if (!sp->units) { in slob_page_alloc()
331 if (sp->units < SLOB_UNITS(size)) in slob_alloc()
367 sp->units = SLOB_UNITS(PAGE_SIZE); in slob_alloc()
388 slobidx_t units; in slob_free() local
397 units = SLOB_UNITS(size); in slob_free()
401 if (sp->units + units == SLOB_UNITS(PAGE_SIZE)) { in slob_free()
413 sp->units = units; in slob_free()
415 set_slob(b, units, in slob_free()
432 sp->units += units; in slob_free()
435 if (b + units == sp->freelist) { in slob_free()
436 units += slob_units(sp->freelist); in slob_free()
439 set_slob(b, units, sp->freelist); in slob_free()
449 if (!slob_last(prev) && b + units == next) { in slob_free()
450 units += slob_units(next); in slob_free()
451 set_slob(b, units, slob_next(next)); in slob_free()
453 set_slob(b, units, next); in slob_free()
456 units = slob_units(b) + slob_units(prev); in slob_free()
457 set_slob(prev, units, slob_next(b)); in slob_free()