mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
MemMap: Check for MAP_FAILED in mmap call.
This commit is contained in:
1 parent
72df3fd339
commit
2b49c3e464
2 files changed
+2
-2
No files matched your search
@@ -140,7 +140,7 @@ u8* MemArena::Find4GBBase() {
|
||||
// address by grabbing 8GB and aligning the pointer.
|
||||
const uint64_t EIGHT_GIGS = 0x200000000ULL;
|
||||
void *base = mmap(0, EIGHT_GIGS, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0);
|
||||
if (base) {
|
||||
if (base && base != MAP_FAILED) {
|
||||
INFO_LOG(SYSTEM, "base: %p", base);
|
||||
uint64_t aligned_base = ((uint64_t)base + 0xFFFFFFFF) & ~0xFFFFFFFFULL;
|
||||
INFO_LOG(SYSTEM, "aligned_base: %p", (void *)aligned_base);
|
||||
|
||||
Reference in new issue
Block a user