mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-22 21:09:52 +00:00
Add NO_MMAP flag in the compilation scripts
This commit is contained in:
parent
ffcab114a1
commit
96fd0f4bcd
@ -186,6 +186,7 @@ option(USE_SYSTEM_MINIUPNPC "Dynamically link against system miniUPnPc" ${USE_SY
|
||||
option(USE_ASAN "Use address sanitizer" OFF)
|
||||
option(USE_UBSAN "Use undefined behaviour sanitizer" OFF)
|
||||
option(USE_CCACHE "Use ccache if detected" ON)
|
||||
option(USE_NO_MMAP "Disable mmap usage" OFF)
|
||||
|
||||
if(USE_CCACHE)
|
||||
include(ccache)
|
||||
@ -247,6 +248,12 @@ if(HTTPS_NOT_AVAILABLE)
|
||||
add_definitions(-DHTTPS_NOT_AVAILABLE)
|
||||
endif()
|
||||
|
||||
# Disable the usage of MMAP for the memory system.
|
||||
# It is not tested on all platforms and can cause issues.
|
||||
if(USE_NO_MMAP)
|
||||
add_definitions(-DNO_MMAP -DMASKED_PSP_MEMORY)
|
||||
endif()
|
||||
|
||||
# Work around for some misfeature of the current glslang build system
|
||||
include_directories(ext/glslang)
|
||||
|
||||
|
@ -137,7 +137,7 @@ void MemArena::ReleaseView(s64 offset, void* view, size_t size) {
|
||||
|
||||
u8* MemArena::Find4GBBase() {
|
||||
// Now, create views in high memory where there's plenty of space.
|
||||
#if PPSSPP_ARCH(64BIT) && !defined(USE_ASAN)
|
||||
#if PPSSPP_ARCH(64BIT) && !defined(USE_ASAN) && !defined(NO_MMAP)
|
||||
// We should probably just go look in /proc/self/maps for some free space.
|
||||
// But let's try the anonymous mmap trick, just like on 32-bit, but bigger and
|
||||
// aligned to 4GB for the movk trick. We can ensure that we get an aligned 4GB
|
||||
|
Loading…
Reference in New Issue
Block a user