aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2014-05-28 15:47:21 +0200
committerMike Pall <mike>2014-05-28 15:47:21 +0200
commit95977599e71a75844143bec686b46d1a10a2771c (patch)
tree73b6bc9cbc90704b69451a664758f96dad978778
parent7400e2c0cc09cfd332f3e9f831872abc343de406 (diff)
parent7fb503dc8682c97f3922f88494b0e4e5c9b9398e (diff)
downloadluajit-95977599e71a75844143bec686b46d1a10a2771c.tar.gz
luajit-95977599e71a75844143bec686b46d1a10a2771c.tar.bz2
luajit-95977599e71a75844143bec686b46d1a10a2771c.zip
Merge branch 'master' into v2.1
-rw-r--r--src/lj_alloc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lj_alloc.c b/src/lj_alloc.c
index f856a7a0..facccee5 100644
--- a/src/lj_alloc.c
+++ b/src/lj_alloc.c
@@ -179,11 +179,17 @@ static LJ_AINLINE int CALL_MUNMAP(void *ptr, size_t size)
179 179
180#if defined(MAP_32BIT) 180#if defined(MAP_32BIT)
181 181
182#if defined(__sun__)
183#define MMAP_REGION_START ((uintptr_t)0x1000)
184#else
182/* Actually this only gives us max. 1GB in current Linux kernels. */ 185/* Actually this only gives us max. 1GB in current Linux kernels. */
186#define MMAP_REGION_START ((uintptr_t)0)
187#endif
188
183static LJ_AINLINE void *CALL_MMAP(size_t size) 189static LJ_AINLINE void *CALL_MMAP(size_t size)
184{ 190{
185 int olderr = errno; 191 int olderr = errno;
186 void *ptr = mmap(NULL, size, MMAP_PROT, MAP_32BIT|MMAP_FLAGS, -1, 0); 192 void *ptr = mmap((void *)MMAP_REGION_START, size, MMAP_PROT, MAP_32BIT|MMAP_FLAGS, -1, 0);
187 errno = olderr; 193 errno = olderr;
188 return ptr; 194 return ptr;
189} 195}