Lines Matching refs:heap

93 alloc_block(struct mem_block *heap, int size, int align2, drm_file_t *filp)
98 for (p = heap->next; p != heap; p = p->next) {
108 find_block(struct mem_block *heap, int start)
112 for (p = heap->next; p != heap; p = p->next)
126 * 'heap' to stop it being subsumed.
146 * Initialize. How to check for an uninitialized heap?
149 init_heap(struct mem_block **heap, int start, int size)
156 *heap = drm_alloc(sizeof (**heap), DRM_MEM_BUFS);
157 if (!*heap) {
165 blocks->next = blocks->prev = *heap;
167 (void) memset(*heap, 0, sizeof (**heap));
168 (*heap)->filp = (drm_file_t *)-1;
169 (*heap)->next = (*heap)->prev = blocks;
177 radeon_mem_release(drm_file_t *filp, struct mem_block *heap)
181 if (!heap || !heap->next)
184 for (p = heap->next; p != heap; p = p->next) {
191 * 'heap' to stop it being subsumed.
193 for (p = heap->next; p != heap; p = p->next) {
208 radeon_mem_takedown(struct mem_block **heap)
212 if (!*heap)
215 for (p = (*heap)->next; p != *heap; ) {
221 drm_free(*heap, sizeof (**heap), DRM_MEM_DRIVER);
222 *heap = NULL;
247 struct mem_block *block, **heap;
271 heap = get_heap(dev_priv, alloc.region);
272 if (!heap || !*heap)
282 block = alloc_block(*heap, alloc.size, alloc.alignment, fpriv);
303 struct mem_block *block, **heap;
312 heap = get_heap(dev_priv, memfree.region);
313 if (!heap || !*heap)
316 block = find_block(*heap, memfree.region_offset);
334 struct mem_block **heap;
343 heap = get_heap(dev_priv, initheap.region);
344 if (!heap)
347 if (*heap) {
348 DRM_ERROR("heap already initialized?");
352 return (init_heap(heap, initheap.start, initheap.size));