Lines Matching full:units
78 * slob_block has a field 'units', which indicates size of block if +ve,
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()
330 if (sp->units < SLOB_UNITS(size)) in slob_alloc()
365 sp->units = SLOB_UNITS(PAGE_SIZE); in slob_alloc()
386 slobidx_t units; in slob_free() local
395 units = SLOB_UNITS(size); in slob_free()
399 if (sp->units + units == SLOB_UNITS(PAGE_SIZE)) { in slob_free()
412 sp->units = units; in slob_free()
414 set_slob(b, units, in slob_free()
431 sp->units += units; in slob_free()
434 if (b + units == sp->freelist) { in slob_free()
435 units += slob_units(sp->freelist); in slob_free()
438 set_slob(b, units, sp->freelist); in slob_free()
448 if (!slob_last(prev) && b + units == next) { in slob_free()
449 units += slob_units(next); in slob_free()
450 set_slob(b, units, slob_next(next)); in slob_free()
452 set_slob(b, units, next); in slob_free()
455 units = slob_units(b) + slob_units(prev); in slob_free()
456 set_slob(prev, units, slob_next(b)); in slob_free()