printmemusage.cpp
Go to the documentation of this file.
00001 #include "printmemusage.h"
00002 
00003 namespace GMapping{
00004 
00005 using namespace std;
00006 void printmemusage(){
00007         pid_t pid=getpid();
00008         char procfilename[1000];
00009         sprintf(procfilename, "/proc/%d/status", pid);
00010         ifstream is(procfilename);
00011         string line;
00012         while (is){
00013                 is >> line;
00014                 if (line=="VmData:"){
00015                         is >> line;
00016                         cerr << "#VmData:\t" << line << endl; 
00017                 }
00018                 if (line=="VmSize:"){
00019                         is >> line;
00020                         cerr << "#VmSize:\t" << line << endl; 
00021                 }
00022                         
00023         }
00024 }
00025 
00026 };
00027 


openslam_gmapping
Author(s): Giorgio Grisetti, Cyrill Stachniss, Wolfram Burgard
autogenerated on Thu Jun 6 2019 19:25:13