mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 14:00:16 +02:00
Syscalls: Removes an old workaround for MAP_FIXED_NOREPLACE
We don't support these old kernels, so remove this workaround.
This commit is contained in:
1 file changed
-8
@@ -740,14 +740,6 @@ uint64_t SyscallHandler::HandleBRK(FEXCore::Core::CpuStateFrame* Frame, void* Ad
|
||||
NewBRK = (uint64_t)GuestMmap(Frame->Thread, (void*)(DataSpace + DataSpaceMappedSize), AllocateNewSize, PROT_READ | PROT_WRITE,
|
||||
MAP_FIXED_NOREPLACE | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
|
||||
if (!FEX::HLE::HasSyscallError(NewBRK) && NewBRK != (DataSpace + DataSpaceMappedSize)) {
|
||||
// Couldn't allocate that the region we wanted
|
||||
// Can happen if MAP_FIXED_NOREPLACE isn't understood by the kernel
|
||||
int ok = GuestMunmap(Frame->Thread, reinterpret_cast<void*>(NewBRK), AllocateNewSize);
|
||||
LOGMAN_THROW_A_FMT(ok != -1, "Munmap failed");
|
||||
NewBRK = ~0ULL;
|
||||
}
|
||||
|
||||
if (FEX::HLE::HasSyscallError(NewBRK)) {
|
||||
// If we couldn't allocate a new region then out of memory
|
||||
return DataSpace + DataSpaceSize;
|
||||
|
||||
Reference in new issue
Block a user