aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/execmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/execmem.c')
-rw-r--r--mesalib/src/mesa/main/execmem.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/execmem.c b/mesalib/src/mesa/main/execmem.c
index 57c1e117c..4c6139985 100644
--- a/mesalib/src/mesa/main/execmem.c
+++ b/mesalib/src/mesa/main/execmem.c
@@ -80,11 +80,10 @@ init_heap(void)
exec_heap = mmInit( 0, EXEC_HEAP_SIZE );
if (!exec_mem)
- exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE,
- PROT_EXEC | PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ exec_mem = mmap(NULL, EXEC_HEAP_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- return (exec_mem != NULL);
+ return (exec_mem != MAP_FAILED);
}