diff options
author | Mike Pall <mike> | 2014-10-07 16:18:46 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2014-10-07 16:18:46 +0200 |
commit | be64823d957bea318e374d7a16a3985158b76cbb (patch) | |
tree | 8e4865fc4f9491923596098d2d6b8991bee7c74e /src/lj_alloc.c | |
parent | 0de431e3f7ab6fa31a56042f2c10ababe0b2b4ab (diff) | |
parent | 4846a714a9b8e01bac8f9fc1de0eb2a5f00ea79b (diff) | |
download | luajit-be64823d957bea318e374d7a16a3985158b76cbb.tar.gz luajit-be64823d957bea318e374d7a16a3985158b76cbb.tar.bz2 luajit-be64823d957bea318e374d7a16a3985158b76cbb.zip |
Merge branch 'master' into v2.1
Diffstat (limited to 'src/lj_alloc.c')
-rw-r--r-- | src/lj_alloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_alloc.c b/src/lj_alloc.c index facccee5..7c7ec678 100644 --- a/src/lj_alloc.c +++ b/src/lj_alloc.c | |||
@@ -194,14 +194,14 @@ static LJ_AINLINE void *CALL_MMAP(size_t size) | |||
194 | return ptr; | 194 | return ptr; |
195 | } | 195 | } |
196 | 196 | ||
197 | #elif LJ_TARGET_OSX || LJ_TARGET_PS4 || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun__) | 197 | #elif LJ_TARGET_OSX || LJ_TARGET_PS4 || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun__) |
198 | 198 | ||
199 | /* OSX and FreeBSD mmap() use a naive first-fit linear search. | 199 | /* OSX and FreeBSD mmap() use a naive first-fit linear search. |
200 | ** That's perfect for us. Except that -pagezero_size must be set for OSX, | 200 | ** That's perfect for us. Except that -pagezero_size must be set for OSX, |
201 | ** otherwise the lower 4GB are blocked. And the 32GB RLIMIT_DATA needs | 201 | ** otherwise the lower 4GB are blocked. And the 32GB RLIMIT_DATA needs |
202 | ** to be reduced to 250MB on FreeBSD. | 202 | ** to be reduced to 250MB on FreeBSD. |
203 | */ | 203 | */ |
204 | #if LJ_TARGET_OSX | 204 | #if LJ_TARGET_OSX || defined(__DragonFly__) |
205 | #define MMAP_REGION_START ((uintptr_t)0x10000) | 205 | #define MMAP_REGION_START ((uintptr_t)0x10000) |
206 | #elif LJ_TARGET_PS4 | 206 | #elif LJ_TARGET_PS4 |
207 | #define MMAP_REGION_START ((uintptr_t)0x4000) | 207 | #define MMAP_REGION_START ((uintptr_t)0x4000) |
@@ -238,7 +238,7 @@ static LJ_AINLINE void *CALL_MMAP(size_t size) | |||
238 | return p; | 238 | return p; |
239 | } | 239 | } |
240 | if (p != CMFAIL) munmap(p, size); | 240 | if (p != CMFAIL) munmap(p, size); |
241 | #ifdef __sun__ | 241 | #if defined(__sun__) || defined(__DragonFly__) |
242 | alloc_hint += 0x1000000; /* Need near-exhaustive linear scan. */ | 242 | alloc_hint += 0x1000000; /* Need near-exhaustive linear scan. */ |
243 | if (alloc_hint + size < MMAP_REGION_END) continue; | 243 | if (alloc_hint + size < MMAP_REGION_END) continue; |
244 | #endif | 244 | #endif |