mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-04-06 06:55:02 +00:00
RPCS3: Notify RAM shortage, Log current and peak RAM usage
This commit is contained in:
parent
2702417192
commit
a4523651c7
7 changed files with 70 additions and 45 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue