summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_mm.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-11-05 15:58:09 -0700
committerBrian Paul <[email protected]>2008-11-05 15:58:09 -0700
commit80a718a63bf2fa817e346f0f5731ee9ef2e0e68b (patch)
tree4a1bdb03ae8b8482b9a15e56c9604fcc34e95b0e /src/gallium/auxiliary/util/u_mm.c
parent7115b79b77e541f3eb81db00f6f0c34a0f224feb (diff)
parentde14fdd63f26a2e6fc55fad92c08966f269601a6 (diff)
Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts: src/gallium/auxiliary/rtasm/rtasm_execmem.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_log.c src/mesa/state_tracker/st_atom_framebuffer.c
Diffstat (limited to 'src/gallium/auxiliary/util/u_mm.c')
-rw-r--r--src/gallium/auxiliary/util/u_mm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_mm.c b/src/gallium/auxiliary/util/u_mm.c
index 592ace00fcc..45ce257b5e5 100644
--- a/src/gallium/auxiliary/util/u_mm.c
+++ b/src/gallium/auxiliary/util/u_mm.c
@@ -172,6 +172,10 @@ u_mmAllocMem(struct mem_block *heap, int size, int align2, int startSearch)
int startofs = 0;
int endofs;
+ assert(size >= 0);
+ assert(align2 >= 0);
+ assert(align2 <= 12); /* sanity check, 2^12 (4KB) enough? */
+
if (!heap || align2 < 0 || size <= 0)
return NULL;