• Home
  • Raw
  • Download

Lines Matching refs:r

32 	struct nouveau_heap *r;  in nouveau_heap_init()  local
34 r = calloc(1, sizeof(struct nouveau_heap)); in nouveau_heap_init()
35 if (!r) in nouveau_heap_init()
38 r->start = start; in nouveau_heap_init()
39 r->size = size; in nouveau_heap_init()
40 *heap = r; in nouveau_heap_init()
57 struct nouveau_heap *r; in nouveau_heap_alloc() local
64 r = calloc(1, sizeof(struct nouveau_heap)); in nouveau_heap_alloc()
65 if (!r) in nouveau_heap_alloc()
68 r->start = (heap->start + heap->size) - size; in nouveau_heap_alloc()
69 r->size = size; in nouveau_heap_alloc()
70 r->in_use = 1; in nouveau_heap_alloc()
71 r->priv = priv; in nouveau_heap_alloc()
75 r->next = heap->next; in nouveau_heap_alloc()
77 heap->next->prev = r; in nouveau_heap_alloc()
78 r->prev = heap; in nouveau_heap_alloc()
79 heap->next = r; in nouveau_heap_alloc()
81 *res = r; in nouveau_heap_alloc()
94 struct nouveau_heap *r; in nouveau_heap_free() local
98 r = *res; in nouveau_heap_free()
101 r->in_use = 0; in nouveau_heap_free()
103 if (r->next && !r->next->in_use) { in nouveau_heap_free()
104 struct nouveau_heap *new = r->next; in nouveau_heap_free()
106 new->prev = r->prev; in nouveau_heap_free()
107 if (r->prev) in nouveau_heap_free()
108 r->prev->next = new; in nouveau_heap_free()
109 new->size += r->size; in nouveau_heap_free()
110 new->start = r->start; in nouveau_heap_free()
112 free(r); in nouveau_heap_free()
113 r = new; in nouveau_heap_free()
116 if (r->prev && !r->prev->in_use) { in nouveau_heap_free()
117 r->prev->next = r->next; in nouveau_heap_free()
118 if (r->next) in nouveau_heap_free()
119 r->next->prev = r->prev; in nouveau_heap_free()
120 r->prev->size += r->size; in nouveau_heap_free()
121 free(r); in nouveau_heap_free()