mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 06:51:26 +12: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
1 changed files with 8 additions and 1 deletions
|
@ -292,7 +292,6 @@ int main(int argc, char** argv)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
ULONG64 intro_cycles{};
|
ULONG64 intro_cycles{};
|
||||||
QueryThreadCycleTime(GetCurrentThread(), &intro_cycles);
|
QueryThreadCycleTime(GetCurrentThread(), &intro_cycles);
|
||||||
SetProcessWorkingSetSize(GetCurrentProcess(), 0x60000000, 0x80000000); // 2GiB
|
|
||||||
#elif defined(RUSAGE_THREAD)
|
#elif defined(RUSAGE_THREAD)
|
||||||
struct ::rusage intro_stats{};
|
struct ::rusage intro_stats{};
|
||||||
::getrusage(RUSAGE_THREAD, &intro_stats);
|
::getrusage(RUSAGE_THREAD, &intro_stats);
|
||||||
|
@ -358,6 +357,14 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
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;
|
std::unique_ptr<logs::listener> log_file;
|
||||||
{
|
{
|
||||||
// Check free space
|
// Check free space
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue