mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 21:00:17 +02:00
Use gradual memory growth
Use min instead of max, otherwise we are always using `MAX_STATS_SIZE`.
This commit is contained in:
1 parent
2febb524e9
commit
e5743f8dae
1 file changed
+1
-1
@@ -76,7 +76,7 @@ uint32_t ThreadManager::StatAlloc::FrontendAllocateSlots(uint32_t NewSize) {
|
||||
// New threads won't get stats.
|
||||
return CurrentSize;
|
||||
}
|
||||
NewSize = std::max(MAX_STATS_SIZE, NewSize);
|
||||
NewSize = std::min(MAX_STATS_SIZE, NewSize);
|
||||
|
||||
// When allocating more slots, open the fd without O_TRUNC | O_CREAT.
|
||||
int fd = shm_open(fextl::fmt::format("fex-{}-stats", ::getpid()).c_str(), O_RDWR, USER_PERMS);
|
||||
|
||||
Reference in new issue
Block a user