1 Aug 2006 11:39
the /proc/meminfo statistics
Abu M. Muttalib <abum <at> aftek.com>
2006-08-01 09:39:32 GMT
2006-08-01 09:39:32 GMT
Hi,
I am running the following application.
#include<stdio.h>
#include<stdlib.h>
int main()
{
unsigned char* arr;
system("cat /proc/meminfo");
sleep(25);
arr = (char *)malloc (1048576);
system("cat /proc/meminfo");
sleep(25);
free(arr);
system("cat /proc/meminfo");
sleep(25);
}
I am getting the following meminfo statistics. As I am allocating and
freeing 1024 kb, so I should get the same information through /proc/meminfo:
MemTotal: 14296 kB
MemFree: 912 kB
Buffers: 1448 kB
Cached: 5564 kB
SwapCached: 0 kB
Active: 5480 kB
Inactive: 3664 kB
(Continue reading)
RSS Feed