Lines Matching refs:extent

119 base_extent_init(size_t *extent_sn_next, extent_t *extent, void *addr,  in base_extent_init()  argument
126 extent_binit(extent, addr, size, sn); in base_extent_init()
172 extent_bsize_get(&block->extent)) >> LG_HUGEPAGE; in base_auto_thp_switch()
180 base_extent_bump_alloc_helper(extent_t *extent, size_t *gap_size, size_t size, in base_extent_bump_alloc_helper() argument
187 *gap_size = ALIGNMENT_CEILING((uintptr_t)extent_addr_get(extent), in base_extent_bump_alloc_helper()
188 alignment) - (uintptr_t)extent_addr_get(extent); in base_extent_bump_alloc_helper()
189 ret = (void *)((uintptr_t)extent_addr_get(extent) + *gap_size); in base_extent_bump_alloc_helper()
190 assert(extent_bsize_get(extent) >= *gap_size + size); in base_extent_bump_alloc_helper()
191 extent_binit(extent, (void *)((uintptr_t)extent_addr_get(extent) + in base_extent_bump_alloc_helper()
192 *gap_size + size), extent_bsize_get(extent) - *gap_size - size, in base_extent_bump_alloc_helper()
193 extent_sn_get(extent)); in base_extent_bump_alloc_helper()
198 base_extent_bump_alloc_post(base_t *base, extent_t *extent, size_t gap_size, in base_extent_bump_alloc_post() argument
200 if (extent_bsize_get(extent) > 0) { in base_extent_bump_alloc_post()
206 sz_size2index(extent_bsize_get(extent) + 1) - 1; in base_extent_bump_alloc_post()
207 extent_heap_insert(&base->avail[index_floor], extent); in base_extent_bump_alloc_post()
232 base_extent_bump_alloc(base_t *base, extent_t *extent, size_t size, in base_extent_bump_alloc() argument
237 ret = base_extent_bump_alloc_helper(extent, &gap_size, size, alignment); in base_extent_bump_alloc()
238 base_extent_bump_alloc_post(base, extent, gap_size, ret, size); in base_extent_bump_alloc()
298 base_extent_init(extent_sn_next, &block->extent, in base_block_alloc()
341 return &block->extent; in base_extent_alloc()
362 base_t *base = (base_t *)base_extent_bump_alloc_helper(&block->extent, in base_new()
389 base_extent_bump_alloc_post(base, &block->extent, gap_size, base, in base_new()
427 extent_t *extent = NULL; in base_alloc_impl() local
430 extent = extent_heap_remove_first(&base->avail[i]); in base_alloc_impl()
431 if (extent != NULL) { in base_alloc_impl()
436 if (extent == NULL) { in base_alloc_impl()
438 extent = base_extent_alloc(tsdn, base, usize, alignment); in base_alloc_impl()
441 if (extent == NULL) { in base_alloc_impl()
446 ret = base_extent_bump_alloc(base, extent, usize, alignment); in base_alloc_impl()
448 *esn = extent_sn_get(extent); in base_alloc_impl()
471 extent_t *extent = base_alloc_impl(tsdn, base, sizeof(extent_t), in base_alloc_extent() local
473 if (extent == NULL) { in base_alloc_extent()
476 extent_esn_set(extent, esn); in base_alloc_extent()
477 return extent; in base_alloc_extent()