Lines Matching refs:obj
60 object_base_p obj = (object_base_p) calloc(1, heap->object_size); in object_heap_expand() local
61 heap->heap_index[i] = obj; in object_heap_expand()
62 if (NULL == obj) { in object_heap_expand()
66 obj->id = i + heap->id_offset; in object_heap_expand()
67 obj->next_free = next_free; in object_heap_expand()
106 object_base_p obj; in object_heap_allocate() local
114 obj = heap->heap_index[heap->next_free]; in object_heap_allocate()
115 heap->next_free = obj->next_free; in object_heap_allocate()
116 obj->next_free = ALLOCATED; in object_heap_allocate()
117 return obj->id; in object_heap_allocate()
126 object_base_p obj; in object_heap_lookup() local
131 obj = heap->heap_index[id]; in object_heap_lookup()
135 if (obj->next_free != ALLOCATED) { in object_heap_lookup()
139 return obj; in object_heap_lookup()
158 object_base_p obj; in object_heap_next() local
161 obj = heap->heap_index[i]; in object_heap_next()
162 if ((obj->next_free == ALLOCATED) || (obj->next_free == SUSPENDED)) { in object_heap_next()
164 return obj; in object_heap_next()
177 void object_heap_free(object_heap_p heap, object_base_p obj) in object_heap_free() argument
180 if (NULL != obj) { in object_heap_free()
182 ASSERT((obj->next_free == ALLOCATED) || (obj->next_free == SUSPENDED)); in object_heap_free()
184 obj->next_free = heap->next_free; in object_heap_free()
185 heap->next_free = obj->id & OBJECT_HEAP_ID_MASK; in object_heap_free()
194 object_base_p obj; in object_heap_destroy() local
198 obj = heap->heap_index[i]; in object_heap_destroy()
199 ASSERT(obj->next_free != ALLOCATED); in object_heap_destroy()
200 ASSERT(obj->next_free != SUSPENDED); in object_heap_destroy()
202 free(obj); in object_heap_destroy()
214 void object_heap_suspend_object(object_base_p obj, int suspend) in object_heap_suspend_object() argument
217 ASSERT(obj->next_free == ALLOCATED); in object_heap_suspend_object()
218 obj->next_free = SUSPENDED; in object_heap_suspend_object()
220 ASSERT(obj->next_free == SUSPENDED); in object_heap_suspend_object()
221 obj->next_free = ALLOCATED; in object_heap_suspend_object()