Lines Matching full:block
181 struct os_memblock *block; in os_mempool_is_sane() local
183 /* Verify that each block in the free list belongs to the mempool. */ in os_mempool_is_sane()
184 SLIST_FOREACH(block, mp, mb_next) { in os_mempool_is_sane()
185 if (!os_memblock_from(mp, block)) { in os_mempool_is_sane()
188 os_mempool_poison_check(block, OS_MEMPOOL_TRUE_BLOCK_SIZE(mp)); in os_mempool_is_sane()
208 /* Check that the block is in the memory buffer range. */ in os_memblock_from()
213 /* All freed blocks should be on true block size boundaries! */ in os_memblock_from()
225 struct os_memblock *block; in os_memblock_get() local
228 block = NULL; in os_memblock_get()
233 /* Get a free block */ in os_memblock_get()
234 block = SLIST_FIRST(mp); in os_memblock_get()
237 SLIST_FIRST(mp) = SLIST_NEXT(block, mb_next); in os_memblock_get()
247 if (block) { in os_memblock_get()
248 os_mempool_poison_check(block, OS_MEMPOOL_TRUE_BLOCK_SIZE(mp)); in os_memblock_get()
252 return (void *)block; in os_memblock_get()
259 struct os_memblock *block; in os_memblock_put_from_cb() local
263 block = (struct os_memblock *)block_addr; in os_memblock_put_from_cb()
266 /* Chain current free list pointer to this block; make this block head */ in os_memblock_put_from_cb()
267 SLIST_NEXT(block, mb_next) = SLIST_FIRST(mp); in os_memblock_put_from_cb()
268 SLIST_FIRST(mp) = block; in os_memblock_put_from_cb()
285 struct os_memblock *block; in os_memblock_put() local
294 /* Check that the block we are freeing is a valid block! */ in os_memblock_put()
300 SLIST_FOREACH(block, mp, mb_next) { in os_memblock_put()
301 assert(block != (struct os_memblock *)block_addr); in os_memblock_put()
306 * instead of freeing the block directly. in os_memblock_put()
316 /* No callback; free the block. */ in os_memblock_put()