diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2003-03-04 11:41:12 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2003-03-04 11:41:12 +0000 |
commit | 51e5f73d2a4020a1bae860057bae2b0eff8e9c70 (patch) | |
tree | fef2776867e95d4e7df99f41279dce7c18a2d55e /shared-core/radeon_mem.c | |
parent | 708ecd0e4b4b1bc2f78dbb4e004bb4d5ec3effe8 (diff) |
DRM_FREE/2 patch from Philip Brown
Diffstat (limited to 'shared-core/radeon_mem.c')
-rw-r--r-- | shared-core/radeon_mem.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shared-core/radeon_mem.c b/shared-core/radeon_mem.c index 7ca10753..3a2c8969 100644 --- a/shared-core/radeon_mem.c +++ b/shared-core/radeon_mem.c @@ -118,7 +118,7 @@ static void free_block( struct mem_block *p ) p->size += q->size; p->next = q->next; p->next->prev = p; - DRM_FREE(q); + DRM_FREE(q, sizeof(*q)); } if (p->prev->pid == 0) { @@ -126,7 +126,7 @@ static void free_block( struct mem_block *p ) q->size += p->size; q->next = p->next; q->next->prev = q; - DRM_FREE(p); + DRM_FREE(p, sizeof(*q)); } } @@ -141,7 +141,7 @@ static int init_heap(struct mem_block **heap, int start, int size) *heap = DRM_MALLOC(sizeof(**heap)); if (!*heap) { - DRM_FREE( blocks ); + DRM_FREE( blocks, sizeof(*blocks) ); return -ENOMEM; } @@ -181,7 +181,7 @@ void radeon_mem_release( struct mem_block *heap ) p->size += q->size; p->next = q->next; p->next->prev = p; - DRM_FREE(q); + DRM_FREE(q, sizeof(*q)); } } } @@ -198,10 +198,10 @@ void radeon_mem_takedown( struct mem_block **heap ) for (p = (*heap)->next ; p != *heap ; ) { struct mem_block *q = p; p = p->next; - DRM_FREE(q); + DRM_FREE(q, sizeof(*q)); } - DRM_FREE( *heap ); + DRM_FREE( *heap, sizeof(**heap) ); *heap = 0; } |