ZZ: When Linux Runs Out of Memory (OOM killer)
When Linux Runs Out of Memory
http://linuxdevcenter.com/pub/a/linux/2006/11/30/linux-out-of-memory.html?page=1
Perhaps you rarely face it, but once you do, you surely know what's
wrong: lack of free memory, or Out of Memory (OOM). The results are
typical: you can no longer allocate more memory and the kernel kills a
task (usually the current running one). Heavy swapping usually
accompanies this situation, so both screen and disk activity reflect
this.
At the bottom of this problem lie other questions: how much memory
do you want to allocate? How much does the operating system (OS)
allocate for you? The basic reason of OOM is simple: you've asked for
more than the available virtual memory space. I say "virtual" because
RAM isn't the only place counted as free memory; any swap areas apply.
Exploring OOM
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
Ò»¡¢Ò»¸öÒÔǰµÄÀÏÒµÎñ,ÀàËÆÏÂÃæÕâÑùµÄ
int test(char * ptest)
£û
return atoi(ptest);
£ý
Òì³£µÄʱºò£¬Ö¸ÕëÊǿյģ¬Á¢Âí¾ÍcoreµôÁË
¶þ¡¢
int uin = 77564267;
......
linuxÃüÁîÊÇÔÚbash»·¾³ÏÂÔËÐУ¬×î³£ÓõÄShellºÍÃüÁîÏÂÃæ×öÏÂ×ܽá
1.ls ÏÔʾµ±Ç°Ä¿Â¼ÏµÄÎļþºÍĿ¼
ͨ³£´îÅä²ÎÊýL £¬ÍêÕûÏÔʾÎļþºÍĿ¼£¬È¨ÏÞ£¬Ê±¼ä¡¢¹éÊô
´îÅäA£¬ÏÔʾ “.” µÄĿ¼ºÍÎļþ
2. cat ²é¿´ÎļþÄÚÈÝ
ͨ³£´îÅäÖØ¶¨Ïò·ûºÅ> £¬> ÊǰÑÒ»¸öÎļþµÄÄÚÈݼÓÔØµ½ÁíÍâÒ»¸öÎļþÄÚÈÝÀïÈ¥ Àý£º cat 1.tx ......
ÐéÄ⻯¼¼ÊõµÄ·½·¨, ¼Ü¹¹ºÍʵÏÖ¸ÅÀÀ
¼¶±ð: Öм¶
M. Tim Jones [mtj@mtjones.com], ¹ËÎʹ¤³Ìʦ, Emulex
ÔÎÄ: Virtual Linux
Òë: ÕÔçæ cn.zhaoke.com
http://blog.zhaoke.com/45.html
2006Äê12ÔÂ29ÈÕ
ÐéÄ⻯¼¼ÊõµÄÓ¦ÓÃÊ®·Ö¹ã·º. µ±Ç°ÐéÄ⻯¼¼ÊõÖ÷Òª¹Ø×¢ÓÚ·þÎñÆ÷µÄÐéÄ⻯, »òÔÚµ¥¸öÖ÷»úÉϼĴæ¶à¸ö¶ÀÁ¢µÄ²Ù×÷ϵͳ. ±¾Î ......