linux and robert
2011年10月26日 星期三
get free memory size in kernel
Just paste this section to where you want to check:
{
#define K(x) ((x) << (PAGE_SHIFT - 10))
struct sysinfo si; \
si_meminfo(&si); \
printk("free=%lu k\n", K(si.freeram)); \
}
may need to include linux/mm.h
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言