RPCS3: Notify RAM shortage, Log current and peak RAM usage

This commit is contained in:
Elad 2026-01-24 22:39:51 +02:00
parent 2702417192
commit a4523651c7
7 changed files with 70 additions and 45 deletions

View file

@ -2879,6 +2879,16 @@ void thread_base::exec()
}
}
if (auto [total, current] = utils::get_memory_usage(); total - current <= 256 * 1024 * 1024)
{
if (reason_buf.empty())
{
reason_buf = std::string{reason};
}
fmt::append(reason_buf, " (Possible RAM deficiency: free RAM: %dMB)", (total - current) / (1024 * 1024));
}
if (!reason_buf.empty())
{
reason = reason_buf;