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
Ïà¹ØÎĵµ£º
ÒëÕߣº¹ùÉÙ±¯
2009/12/02
ÔÎÄ£ºlinux/Documentation/driver-model/device.txt
»ù±¾µÄÉ豸Êý¾Ý½á¹¹
~~~~~~~~~~~~~~~~~~
struct device {
struct list_head g_list;
struct list_head node;
......
ÔÚlinuxϰ²×°ÅäÖÃsvn¶ÀÁ¢·þÎñÆ÷
subversion(ÒÔϼò³Æsvn)ÊǽüÄêÀ´áÈÆðµÄ°æ±¾¹ÜÀí¹¤¾ß£¬ÊÇcvsµÄ½Ó°àÈË¡£ svn·þÎñÆ÷ÓÐ2ÖÖÔËÐз½Ê½£º¶ÀÁ¢·þÎñÆ÷ºÍ½èÖúapache¡£2ÖÖ·½Ê½¸÷ÓÐÀû±×¡£
svn´æ´¢°æ±¾Êý¾ÝÒ²ÓÐ2ÖÖ·½Ê½£ºBDBºÍFSFS¡£ÒòΪBDB·½Ê½ÔÚ·þÎñÆ÷ÖжÏʱ£¬ÓпÉÄÜËø×¡Êý¾Ý£¨ÎÒÔÚ¸ãldapʱ¾ÍÉîÊÜÆäº¦£¬Ã»·¨¸ùÖΣ©£¬ËùÒÔ»¹ÊÇ ......
Ò»¡¢Ò»¸öÒÔǰµÄÀÏÒµÎñ,ÀàËÆÏÂÃæÕâÑùµÄ
int test(char * ptest)
£û
return atoi(ptest);
£ý
Òì³£µÄʱºò£¬Ö¸ÕëÊǿյģ¬Á¢Âí¾ÍcoreµôÁË
¶þ¡¢
int uin = 77564267;
......
mountÊÇÓÃÀ´¹ÒÔØÎļþϵͳµÄ£¬¿ÉÒÔÔÚÆô¶¯µÄʱºò¹ÒÔØÒ²¿ÉÒÔÔÚÆô¶¯ºó¹ÒÔØ¡£ÔÚÆô¶¯ºó¹ÒÔØ¿ÉÒÔʹÓÃmountÃüÁîʵÏÖ£¬ÒªÊµÏÖÆô¶¯Ê±×Ô¶¯¹ÒÔØÉ豸ÔòÐèÆô¶¯autofs·þÎñ¾ÍÌṩÕâÖÖ¹¦ÄÜ¡£¸Ã¹¦ÄܾÍÏñwindowsÖеĹâÇý×Ô¶¯´ò¿ª¹¦ÄÜ£¬Äܹ»¼°Ê±¹ÒÔØ¶¯Ì¬¼ÓÔØµÄÎļþϵͳ¡£ÃâÈ¥ÎÒÃÇÊÖ¶¯¹ÒÔÚÂé·³¡£ÒªÊµÏÖ¹âÇý£¬ÈíÅ̵ȵĶ¯Ì¬×Ô¶¯¹ÒÔØ£¬ÐèÒª½øÐÐÏà¹Øµ ......