Lines Matching refs:elt
87 slab_free_orphaned(struct slab_element_header *elt) in slab_free_orphaned() argument
91 assert(elt->owner & 1); in slab_free_orphaned()
93 page = (struct slab_page_header *)(elt->owner & ~(intptr_t)1); in slab_free_orphaned()
153 struct slab_element_header *elt = slab_get_element(pool->parent, page, i); in slab_destroy_child() local
154 p_atomic_set(&elt->owner, (intptr_t)page | 1); in slab_destroy_child()
159 struct slab_element_header *elt = pool->migrated; in slab_destroy_child() local
160 pool->migrated = elt->next; in slab_destroy_child()
161 slab_free_orphaned(elt); in slab_destroy_child()
167 struct slab_element_header *elt = pool->free; in slab_destroy_child() local
168 pool->free = elt->next; in slab_destroy_child()
169 slab_free_orphaned(elt); in slab_destroy_child()
186 struct slab_element_header *elt = slab_get_element(pool->parent, page, i); in slab_add_new_page() local
187 elt->owner = (intptr_t)pool; in slab_add_new_page()
188 assert(!(elt->owner & 1)); in slab_add_new_page()
190 elt->next = pool->free; in slab_add_new_page()
191 pool->free = elt; in slab_add_new_page()
192 SET_MAGIC(elt, SLAB_MAGIC_FREE); in slab_add_new_page()
209 struct slab_element_header *elt; in slab_alloc() local
225 elt = pool->free; in slab_alloc()
226 pool->free = elt->next; in slab_alloc()
228 CHECK_MAGIC(elt, SLAB_MAGIC_FREE); in slab_alloc()
229 SET_MAGIC(elt, SLAB_MAGIC_ALLOCATED); in slab_alloc()
231 return &elt[1]; in slab_alloc()
257 struct slab_element_header *elt = ((struct slab_element_header*)ptr - 1); in slab_free() local
260 CHECK_MAGIC(elt, SLAB_MAGIC_ALLOCATED); in slab_free()
261 SET_MAGIC(elt, SLAB_MAGIC_FREE); in slab_free()
263 if (p_atomic_read(&elt->owner) == (intptr_t)pool) { in slab_free()
267 elt->next = pool->free; in slab_free()
268 pool->free = elt; in slab_free()
279 owner_int = p_atomic_read(&elt->owner); in slab_free()
283 elt->next = owner->migrated; in slab_free()
284 owner->migrated = elt; in slab_free()
291 slab_free_orphaned(elt); in slab_free()