diff options
author | Brian Paul <[email protected]> | 2008-10-29 14:55:02 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-10-29 14:55:57 -0600 |
commit | 8160cb4935151a12588acbe546f00ce8d77bda91 (patch) | |
tree | 6ed28e7c2ee8c2dc740d8a204a19315c9f589d7d /src/gallium | |
parent | 52e6fbb655f138f70670abdd365258873a78dabf (diff) |
gallium: fix alignment parameter passed to u_mmAllocMem()
Was 32, now 5. The param is expressed as a power of two exponent.
The net effect is that the alignment was a no-op on X86 but on PPC we
always got the same memory address everytime rtasm_exec_malloc() was called.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/rtasm/rtasm_execmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/rtasm/rtasm_execmem.c b/src/gallium/auxiliary/rtasm/rtasm_execmem.c index 19087589a87..bb3b1a4c25f 100644 --- a/src/gallium/auxiliary/rtasm/rtasm_execmem.c +++ b/src/gallium/auxiliary/rtasm/rtasm_execmem.c @@ -82,8 +82,8 @@ rtasm_exec_malloc(size_t size) init_heap(); if (exec_heap) { - size = (size + 31) & ~31; - block = mmAllocMem( exec_heap, size, 32, 0 ); + size = (size + 31) & ~31; /* next multiple of 32 bytes */ + block = u_mmAllocMem( exec_heap, size, 5, 0 ); /* 5 -> 32-byte alignment */ } if (block) |