Lines Matching refs:heap

90 alloc_block(struct mem_block *heap, int size, int align2, drm_file_t *filp)
95 for (p = heap->next; p != heap; p = p->next) {
105 find_block(struct mem_block *heap, int start)
109 for (p = heap->next; p != heap; p = p->next)
123 * 'heap' to stop it being subsumed.
143 * Initialize. How to check for an uninitialized heap?
146 init_heap(struct mem_block **heap, int start, int size)
153 *heap = drm_alloc(sizeof (**heap), DRM_MEM_BUFS);
154 if (!*heap) {
162 blocks->next = blocks->prev = *heap;
164 (void) memset(*heap, 0, sizeof (**heap));
165 (*heap)->filp = (drm_file_t *)-1;
166 (*heap)->next = (*heap)->prev = blocks;
174 radeon_mem_release(drm_file_t *filp, struct mem_block *heap)
178 if (!heap || !heap->next)
181 for (p = heap->next; p != heap; p = p->next) {
188 * 'heap' to stop it being subsumed.
190 for (p = heap->next; p != heap; p = p->next) {
205 radeon_mem_takedown(struct mem_block **heap)
209 if (!*heap)
212 for (p = (*heap)->next; p != *heap; ) {
218 drm_free(*heap, sizeof (**heap), DRM_MEM_DRIVER);
219 *heap = NULL;
244 struct mem_block *block, **heap;
268 heap = get_heap(dev_priv, alloc.region);
269 if (!heap || !*heap)
279 block = alloc_block(*heap, alloc.size, alloc.alignment, fpriv);
300 struct mem_block *block, **heap;
309 heap = get_heap(dev_priv, memfree.region);
310 if (!heap || !*heap)
313 block = find_block(*heap, memfree.region_offset);
331 struct mem_block **heap;
340 heap = get_heap(dev_priv, initheap.region);
341 if (!heap)
344 if (*heap) {
345 DRM_ERROR("heap already initialized?");
349 return (init_heap(heap, initheap.start, initheap.size));