HI
Does anybody know how to allocate ram that si being used and how much of ram is free. OS is Linux.
Have a nice Day
Matt
HI
Does anybody know how to allocate ram that si being used and how much of ram is free. OS is Linux.
Have a nice Day
Matt
Why would you want to allocate RAM that is already being used?
There's no standard C way to determine how much free RAM there is available. This question belongs in the Linux programming forum.
A bewildering number of system memory statistics are available in /proc/meminfo on recent Linux systems. There is a web page at RedHat that describes what's in /proc/meminfo at some level of detail.
Insert obnoxious but pithy remark here
Hi
You may want to have a look at
http://www.advancedlinuxprogramming.com/
Chapter 7 The /proc file system describes some tips about /proc. ou may find something useful...
And also free(1) shows you the amoount of free memory. The free(1) system command is a part of the procfs package. You can get the package from
http://procps.sourceforge.net/
See the free.c file.