summaryrefslogtreecommitdiff
path: root/graphics/MesaLib/patches/patch-ap
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/MesaLib/patches/patch-ap')
-rw-r--r--graphics/MesaLib/patches/patch-ap63
1 files changed, 0 insertions, 63 deletions
diff --git a/graphics/MesaLib/patches/patch-ap b/graphics/MesaLib/patches/patch-ap
deleted file mode 100644
index 61b7e38a61e..00000000000
--- a/graphics/MesaLib/patches/patch-ap
+++ /dev/null
@@ -1,63 +0,0 @@
-$NetBSD: patch-ap,v 1.1 2008/04/24 07:40:24 bjs Exp $
-
-This patch enables code for handing out chunks of executable memory
-from an "EXEC_HEAP_SIZE-ed" anonymous area.
-
-Previously, it was only enabled for linux! Nice!
-
-While here, add code to look for the 'MESA_EXECMEM_WIRED' environment
-variable. If it is defined (assuming MAP_WIRED is defined at build
-time, of course), then the mapped anonymous pages are wired down.
-
---- src/mesa/main/execmem.c.orig 2007-11-03 10:41:44.000000000 -0400
-+++ src/mesa/main/execmem.c
-@@ -36,7 +36,7 @@
-
-
-
--#if defined(__linux__)
-+#if defined(MESA_EXECMEM_MMAP)
-
- /*
- * Allocate a large block of memory which can hold code then dole it out
-@@ -47,26 +47,38 @@
- #include <sys/mman.h>
- #include "mm.h"
-
-+#ifndef EXEC_HEAP_SIZE
- #define EXEC_HEAP_SIZE (10*1024*1024)
-+#endif
-+
-+#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
-+#define MAP_ANONYMOUS MAP_ANON
-+#endif
-
- _glthread_DECLARE_STATIC_MUTEX(exec_mutex);
-
- static struct mem_block *exec_heap = NULL;
- static unsigned char *exec_mem = NULL;
-
-+static int flags = MAP_PRIVATE | MAP_ANONYMOUS;
-+
-
- static void
- init_heap(void)
- {
-+#ifdef MAP_WIRED
-+ flags |= _mesa_getenv("MESA_EXECMEM_WIRED") ? MAP_WIRED : 0;
-+#endif
-+
- if (!exec_heap)
- 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);
--}
-+ flags, -1, 0);
-
-+}
-
- void *
- _mesa_exec_malloc(GLuint size)