mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-07-10 01:24:41 -06:00
Clean return value if sysconf fails
This commit is contained in:
parent
49d1b1feb4
commit
e3ea4c5046
@ -8,6 +8,10 @@
|
||||
uint64 QueryRamUsage()
|
||||
{
|
||||
long page_size = sysconf(_SC_PAGESIZE);
|
||||
if (page_size == -1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::ifstream file("/proc/self/statm");
|
||||
if (file)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user