aboutsummaryrefslogtreecommitdiff
path: root/src/lj_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_alloc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lj_alloc.c b/src/lj_alloc.c
index dc64dca9..32de45ec 100644
--- a/src/lj_alloc.c
+++ b/src/lj_alloc.c
@@ -77,7 +77,7 @@
77#define WIN32_LEAN_AND_MEAN 77#define WIN32_LEAN_AND_MEAN
78#include <windows.h> 78#include <windows.h>
79 79
80#if LJ_64 80#if LJ_64 && !LJ_GC64
81 81
82/* Undocumented, but hey, that's what we all love so much about Windows. */ 82/* Undocumented, but hey, that's what we all love so much about Windows. */
83typedef long (*PNTAVM)(HANDLE handle, void **addr, ULONG zbits, 83typedef long (*PNTAVM)(HANDLE handle, void **addr, ULONG zbits,
@@ -174,8 +174,10 @@ static LJ_AINLINE int CALL_MUNMAP(void *ptr, size_t size)
174#endif 174#endif
175#define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS) 175#define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS)
176 176
177#if LJ_64 177#if LJ_64 && !LJ_GC64
178/* 64 bit mode needs special support for allocating memory in the lower 2GB. */ 178/* 64 bit mode with 32 bit pointers needs special support for allocating
179** memory in the lower 2GB.
180*/
179 181
180#if defined(MAP_32BIT) 182#if defined(MAP_32BIT)
181 183
@@ -258,7 +260,7 @@ static LJ_AINLINE void *CALL_MMAP(size_t size)
258 260
259#else 261#else
260 262
261/* 32 bit mode is easy. */ 263/* 32 bit mode and GC64 mode is easy. */
262static LJ_AINLINE void *CALL_MMAP(size_t size) 264static LJ_AINLINE void *CALL_MMAP(size_t size)
263{ 265{
264 int olderr = errno; 266 int olderr = errno;
@@ -294,7 +296,7 @@ static LJ_AINLINE void *CALL_MREMAP_(void *ptr, size_t osz, size_t nsz,
294#define CALL_MREMAP(addr, osz, nsz, mv) CALL_MREMAP_((addr), (osz), (nsz), (mv)) 296#define CALL_MREMAP(addr, osz, nsz, mv) CALL_MREMAP_((addr), (osz), (nsz), (mv))
295#define CALL_MREMAP_NOMOVE 0 297#define CALL_MREMAP_NOMOVE 0
296#define CALL_MREMAP_MAYMOVE 1 298#define CALL_MREMAP_MAYMOVE 1
297#if LJ_64 299#if LJ_64 && !LJ_GC64
298#define CALL_MREMAP_MV CALL_MREMAP_NOMOVE 300#define CALL_MREMAP_MV CALL_MREMAP_NOMOVE
299#else 301#else
300#define CALL_MREMAP_MV CALL_MREMAP_MAYMOVE 302#define CALL_MREMAP_MV CALL_MREMAP_MAYMOVE