mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-27 22:03:20 +00:00
several fixes (#112)
* updated fmt * submodules updated * fixed _TIMESPEC_DEFINED for winpthreads under windows * fixed sdl3 under qt * virtual_memory: Ensure mapped addresses stay inside the user area * Fixes LLE Libc crashing on linux --------- Co-authored-by: GPUCode <geoster3d@gmail.com>
This commit is contained in:
parent
5ed4891a1f
commit
e99129d72f
12 changed files with 20 additions and 26 deletions
|
@ -2,7 +2,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
#define _TIMESPEC_DEFINED
|
||||
|
||||
#include <pthread.h>
|
||||
#include "common/types.h"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
#define _TIMESPEC_DEFINED
|
||||
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
|
|
|
@ -170,7 +170,8 @@ u64 memory_alloc_aligned(u64 address, u64 size, MemoryMode mode, u64 alignment)
|
|||
}
|
||||
return ptr;
|
||||
#else
|
||||
void* hint_address = reinterpret_cast<void*>(AlignUp(address, alignment));
|
||||
void* hint_address = address == 0 ? reinterpret_cast<void*>(USER_MIN)
|
||||
: reinterpret_cast<void*>(AlignUp(address, alignment));
|
||||
void* ptr = mmap(hint_address, size, convertMemoryMode(mode), MAP_ANON | MAP_PRIVATE, -1, 0);
|
||||
ASSERT(ptr != MAP_FAILED);
|
||||
return reinterpret_cast<u64>(ptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue