C++Guns – RoboBlog

20.01.2011

C freien Speicher ermitteln

Filed under: Allgemein — Tags: — Thomas @ 13:01

Das Zauberwort heisst sysinfo.

// Um den freien RAM zu bestimmen
#include < sys/sysinfo.h >

struct sysinfo meminfo;
if(sysinfo(&meminfo) != 0)
perror("Kann keine RAM Infos auslesen");

printf("mem total %i\n" ,meminfo.totalram/1024/1024);

free memory usage

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress