summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-11-07 08:47:35 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-11-07 08:47:35 +0000
commit71744f7642a317d78028888d6cc14e3ab752cd60 (patch)
treebb62aed399c5c577b8acc38d5b5516138f73c874 /src
parent89ff9a0db4f28cdecaaf83178b3f03a47da5e06a (diff)
fix for the memory allocation in the jitter which should work for Windows.
Diffstat (limited to 'src')
-rw-r--r--src/runtime/c/pgf/jit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/runtime/c/pgf/jit.c b/src/runtime/c/pgf/jit.c
index a74fb9e40..250b5a3a6 100644
--- a/src/runtime/c/pgf/jit.c
+++ b/src/runtime/c/pgf/jit.c
@@ -48,10 +48,12 @@ pgf_jit_alloc_page(PgfJitState* state)
size_t page_size = getpagesize();
-#ifndef ANDROID
- if (posix_memalign(&page, page_size, page_size) != 0) {
+#if defined(ANDROID)
+ if ((page = memalign(page_size, page_size)) == NULL) {
+#elif defined(__MINGW32__)
+ if ((page = malloc(page_size)) == NULL) {
#else
- if ((page = memalign(page_size, page_size)) == NULL) {
+ if (posix_memalign(&page, page_size, page_size) != 0) {
#endif
gu_fatal("Memory allocation failed");
}