diff options
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 |