Try to set 2-3 GiB working space and show error if it's failed (Windows)
This commit is contained in:
+8
-1
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user