mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
gallium: new sanity assertions in mmAllocMem()
This commit is contained in:
parent
7d7f0f1706
commit
766cb95a45
1 changed files with 4 additions and 0 deletions
|
|
@ -172,6 +172,10 @@ 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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue