mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 15:01:18 +12:00
Clean return value if sysconf
fails
This commit is contained in:
parent
49d1b1feb4
commit
e3ea4c5046
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue