Lines Matching refs:elt
89 slab_free_orphaned(struct slab_element_header *elt) in slab_free_orphaned() argument
93 assert(elt->owner & 1); in slab_free_orphaned()
95 page = (struct slab_page_header *)(elt->owner & ~(intptr_t)1); in slab_free_orphaned()
154 struct slab_element_header *elt = slab_get_element(pool->parent, page, i); in slab_destroy_child() local
155 p_atomic_set(&elt->owner, (intptr_t)page | 1); in slab_destroy_child()
160 struct slab_element_header *elt = pool->migrated; in slab_destroy_child() local
161 pool->migrated = elt->next; in slab_destroy_child()
162 slab_free_orphaned(elt); in slab_destroy_child()
168 struct slab_element_header *elt = pool->free; in slab_destroy_child() local
169 pool->free = elt->next; in slab_destroy_child()
170 slab_free_orphaned(elt); in slab_destroy_child()
187 struct slab_element_header *elt = slab_get_element(pool->parent, page, i); in slab_add_new_page() local
188 elt->owner = (intptr_t)pool; in slab_add_new_page()
189 assert(!(elt->owner & 1)); in slab_add_new_page()
191 elt->next = pool->free; in slab_add_new_page()
192 pool->free = elt; in slab_add_new_page()
193 SET_MAGIC(elt, SLAB_MAGIC_FREE); in slab_add_new_page()
210 struct slab_element_header *elt; in slab_alloc() local
226 elt = pool->free; in slab_alloc()
227 pool->free = elt->next; in slab_alloc()
229 CHECK_MAGIC(elt, SLAB_MAGIC_FREE); in slab_alloc()
230 SET_MAGIC(elt, SLAB_MAGIC_ALLOCATED); in slab_alloc()
232 return &elt[1]; in slab_alloc()
246 struct slab_element_header *elt = ((struct slab_element_header*)ptr - 1); in slab_free() local
249 CHECK_MAGIC(elt, SLAB_MAGIC_ALLOCATED); in slab_free()
250 SET_MAGIC(elt, SLAB_MAGIC_FREE); in slab_free()
252 if (p_atomic_read(&elt->owner) == (intptr_t)pool) { in slab_free()
256 elt->next = pool->free; in slab_free()
257 pool->free = elt; in slab_free()
267 owner_int = p_atomic_read(&elt->owner); in slab_free()
271 elt->next = owner->migrated; in slab_free()
272 owner->migrated = elt; in slab_free()
277 slab_free_orphaned(elt); in slab_free()