aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/execmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/execmem.c')
-rw-r--r--src/mesa/main/execmem.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c
index 37a043a0b3a..b2018b5e767 100644
--- a/src/mesa/main/execmem.c
+++ b/src/mesa/main/execmem.c
@@ -32,7 +32,6 @@
#include <stdio.h>
-#include "util/imports.h"
#include "main/glheader.h"
#include "execmem.h"
#include "c11/threads.h"
@@ -80,7 +79,7 @@ init_heap(void)
if (!exec_heap)
exec_heap = u_mmInit( 0, EXEC_HEAP_SIZE );
-
+
if (!exec_mem)
exec_mem = mmap(NULL, EXEC_HEAP_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
@@ -107,24 +106,24 @@ _mesa_exec_malloc(unsigned size)
if (block)
addr = exec_mem + block->ofs;
- else
+ else
printf("_mesa_exec_malloc failed\n");
bail:
mtx_unlock(&exec_mutex);
-
+
return addr;
}
-
-void
+
+void
_mesa_exec_free(void *addr)
{
mtx_lock(&exec_mutex);
if (exec_heap) {
struct mem_block *block = u_mmFindBlock(exec_heap, (unsigned char *)addr - exec_mem);
-
+
if (block)
u_mmFreeMem(block);
}
@@ -145,8 +144,8 @@ _mesa_exec_malloc(unsigned size)
return malloc( size );
}
-
-void
+
+void
_mesa_exec_free(void *addr)
{
free(addr);