Posted on March 19, 2010, 10:21 am, by Sungju, under
Memory.
When you feel curious about what memory status is at some point, you can use SysRq facility. After enabling the sysrq featulre by execute following command, you just need to press ‘SysRq’ + ‘m’ or trigger the command. 1 echo 1 > /proc/sys/kernel/sysrq Above command enables the SysRq feature. To get memory status, you can [...]
Posted on March 24, 2009, 5:10 am, by Sungju, under
Memory.
I thought Linux fixed highmem zone and low mem zone at the compile time. But, I was wrong. I even found the command line parameter named ‘highmem=’ which can set the highmem size. Actually, this calculation is done during the initialization and following is the code which actually do the thing. 895/* 896 * Determine [...]
Posted on March 24, 2009, 4:52 am, by Sungju, under
Memory.
I wondered where linux get information about memory capacity in the machine. In i386 machine, we can get information from BIOS or e820 which is shorthand for BIOS function name. You can find some information from whikipedia : http://en.wikipedia.org/wiki/E820 Anyway, after checking basic memory map information, kernel call following function to get max_pfn value. 868/* [...]
Posted on March 2, 2009, 3:01 am, by Sungju, under
Memory.
If your application have to fight with huge amount of memory resources, you will find this unexpected result sometimes. Even though you free()ed every memory into the Kernel, your process still holding that memory when you check with vmstat or free command. It can be act differently among different Linux distributions and different library set. [...]