mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 13:00:41 +02:00
Removes MAP_GROWSDOWN usage
This is just a memory leak waiting to happen. Only the primary thread in an application really should have this set since the kernel cleans it up. We only ever allocate the primary thread of the guest application then every host thread's stack on top of that. It's up to the guest when it is cloning to set up new stack pointers, we don't manage that. We are already allocating the first thread's size at the soft stack limit with RLIMIT_STACK anyway. Fixes #1556
This commit is contained in:
1 parent
4bb3a54ccf
commit
b88d8a7cc4
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -31,7 +31,7 @@ namespace FEXCore::Threads {
|
||||
std::lock_guard lk{DeadStackPoolMutex};
|
||||
if (DeadStackPool.size() == 0) {
|
||||
// Nothing in the pool, just allocate
|
||||
return FEXCore::Allocator::mmap(nullptr, Size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN, -1, 0);
|
||||
return FEXCore::Allocator::mmap(nullptr, Size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
}
|
||||
|
||||
// Keep the first item in the stack pool
|
||||
|
||||
Reference in new issue
Block a user