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()
221 int delta = 0, units = SLOB_UNITS(size); in slob_page_alloc() local
230 if (avail >= units + delta) { /* room enough? */ in slob_page_alloc()
243 if (avail == units) { /* exact fit? unlink. */ in slob_page_alloc()
250 set_slob(prev, slob_units(prev), cur + units); in slob_page_alloc()
252 sp->freelist = cur + units; in slob_page_alloc()
253 set_slob(cur + units, avail - units, next); in slob_page_alloc()
256 sp->units -= units; in slob_page_alloc()
257 if (!sp->units) in slob_page_alloc()
296 if (sp->units < SLOB_UNITS(size)) in slob_alloc()
324 sp->units = SLOB_UNITS(PAGE_SIZE); in slob_alloc()
345 slobidx_t units; in slob_free() local
354 units = SLOB_UNITS(size); in slob_free()
358 if (sp->units + units == SLOB_UNITS(PAGE_SIZE)) { in slob_free()
371 sp->units = units; in slob_free()
373 set_slob(b, units, in slob_free()
390 sp->units += units; in slob_free()
393 if (b + units == sp->freelist) { in slob_free()
394 units += slob_units(sp->freelist); in slob_free()
397 set_slob(b, units, sp->freelist); in slob_free()
407 if (!slob_last(prev) && b + units == next) { in slob_free()
408 units += slob_units(next); in slob_free()
409 set_slob(b, units, slob_next(next)); in slob_free()
411 set_slob(b, units, next); in slob_free()
414 units = slob_units(b) + slob_units(prev); in slob_free()
415 set_slob(prev, units, slob_next(b)); in slob_free()