1
0
Fork 0

Fixed GetPhysicalRAMUsage on Linux

This commit is contained in:
andrew 2014-01-01 11:18:56 +02:00
parent a3c698596c
commit 852c52bee9
1 changed files with 2 additions and 2 deletions

View File

@ -701,9 +701,9 @@ int cRoot::GetPhysicalRAMUsage(void)
{
AString Line;
std::getline(StatFile, Line);
if (strncmp(Line.c_str(), "VmRSS:", 7) == 0)
if (strncmp(Line.c_str(), "VmRSS:", 6) == 0)
{
int res = atoi(Line.c_str() + 8);
int res = atoi(Line.c_str() + 7);
return (res == 0) ? -1 : res; // If parsing failed, return -1
}
}