Avoid using MAP_JIT mmap flag on macOS < 10.14 #48

Merged
sigmaris merged 1 commit from map_jit_backwards_compat into master 2020-06-07 21:58:56 -04:00
sigmaris commented 2020-06-06 11:09:27 -04:00 (Migrated from github.com)

If compiled with the macOS 10.14 SDK, MAP_JIT will be defined and passed as a flag to mmap to allocate memory for the dynarec, but passing this flag will cause mmap to fail if running on macOS 10.13 and below; on macOS check the OS version at runtime, set and cache the appropriate flags for mmap.

Fixes #47

If compiled with the macOS 10.14 SDK, MAP_JIT will be defined and passed as a flag to mmap to allocate memory for the dynarec, but passing this flag will cause mmap to fail if running on macOS 10.13 and below; on macOS check the OS version at runtime, set and cache the appropriate flags for mmap. Fixes #47
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: chris/Cog#48
No description provided.