From a6f78d4eee85ccda42384ebfcc956bc8e6444c36 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 10 Feb 2006 00:01:45 +0000 Subject: Use aligned malloc for backing store, if necessary. --- src/mesa/drivers/dri/i915/bufmgr_fake.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i915/bufmgr_fake.c b/src/mesa/drivers/dri/i915/bufmgr_fake.c index 270f47e8a4..4136041eae 100644 --- a/src/mesa/drivers/dri/i915/bufmgr_fake.c +++ b/src/mesa/drivers/dri/i915/bufmgr_fake.c @@ -15,6 +15,7 @@ #include "hash.h" #include "simple_list.h" #include "mm.h" +#include "imports.h" struct _mesa_HashTable; @@ -125,7 +126,7 @@ static struct block *alloc_local( unsigned size ) DBG("alloc_local 0x%x\n", size); block->mem_type = BM_MEM_LOCAL; - block->virtual = malloc(size); + block->virtual = ALIGN_MALLOC(size, 1<<7); if (!block->virtual) { free(block); return NULL; @@ -209,7 +210,7 @@ static void free_block( struct bufmgr *bm, struct block *block ) break; case BM_MEM_LOCAL: - free(block->virtual); + ALIGN_FREE(block->virtual); free(block); break; -- cgit v1.2.3