File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -66,21 +66,21 @@ void mem_status( MemoryStatus & status )
6666 if ( substr.compare ( " MemTotal" ) == 0 )
6767 {
6868 // get total memory
69- total_mem = stoi ( line.substr ( substr_start, substr_len ) );
69+ total_mem = stol ( line.substr ( substr_start, substr_len ) );
7070 }
7171 else if ( substr.compare ( " MemFree" ) == 0 )
7272 {
73- used_mem = total_mem - stoi ( line.substr ( substr_start, substr_len ) );
73+ used_mem = total_mem - stol ( line.substr ( substr_start, substr_len ) );
7474 }
7575 else if ( substr.compare ( " Shmem" ) == 0 )
7676 {
77- used_mem += stoi ( line.substr ( substr_start, substr_len ) );
77+ used_mem += stol ( line.substr ( substr_start, substr_len ) );
7878 }
7979 else if ( substr.compare ( " Buffers" ) == 0 ||
8080 substr.compare ( " Cached" ) == 0 ||
8181 substr.compare ( " SReclaimable" ) == 0 )
8282 {
83- used_mem -= stoi ( line.substr ( substr_start, substr_len ) );
83+ used_mem -= stol ( line.substr ( substr_start, substr_len ) );
8484 }
8585 }
8686
You can’t perform that action at this time.
0 commit comments