summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2006-02-10 00:01:45 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2006-02-10 00:01:45 +0000
commita6f78d4eee85ccda42384ebfcc956bc8e6444c36 (patch)
tree98e3dc6aaddb82dd16e2cc30a7f7bed57eefde8a
parentae695e3566a0fd4e55e813bc6911a5c53bc57580 (diff)
Use aligned malloc for backing store, if necessary.mesa_texman_20060210
-rw-r--r--src/mesa/drivers/dri/i915/bufmgr_fake.c5
1 files 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;