Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sys/types.h>
- #include <sys/sysinfo.h>
- #include <iostream>
- using namespace std;
- int main (){
- struct sysinfo memoire;
- sysinfo (&memoire);
- cout <<"total "<<memoire.totalram<<endl;
- cout <<"libre "<<memoire.freeram<<endl;
- cout <<"shared "<<memoire.sharedram<<endl;
- cout <<memoire.bufferram<<endl;
- cout <<memoire.totalswap<<endl;
- cout <<memoire.freeswap<<endl;
- cout <<endl<<"Version free --------------"<<endl;
- system("free -b");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement