mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
Try to set 2-3 GiB working space and show error if it's failed (Windows)
This commit is contained in:
parent
872655369a
commit
2bee096246
@ -292,7 +292,6 @@ int main(int argc, char** argv)
|
||||
#ifdef _WIN32
|
||||
ULONG64 intro_cycles{};
|
||||
QueryThreadCycleTime(GetCurrentThread(), &intro_cycles);
|
||||
SetProcessWorkingSetSize(GetCurrentProcess(), 0x60000000, 0x80000000); // 2GiB
|
||||
#elif defined(RUSAGE_THREAD)
|
||||
struct ::rusage intro_stats{};
|
||||
::getrusage(RUSAGE_THREAD, &intro_stats);
|
||||
@ -358,6 +357,14 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!SetProcessWorkingSetSize(GetCurrentProcess(), 0x80000000, 0xC0000000)) // 2-3 GiB
|
||||
{
|
||||
report_fatal_error("Not enough memory for RPCS3 process.");
|
||||
return 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
std::unique_ptr<logs::listener> log_file;
|
||||
{
|
||||
// Check free space
|
||||
|
Loading…
Reference in New Issue
Block a user