linuxÄÚ´æ¹ÜÀí
Ò³ÉêÇëµÄºËÐĵ÷ÓÃÊÇ: __alloc_pages(). Ò³ÉêÇë˳ÐòÈçÏ£º
Ê×ÏÈÕÒ×î´óÄÜ·ûºÏµÄ¿é, Èç¹ûÒ»¸ö¿ÕÏп鲻ÄÜÂú×ã, ¸ü¸ßÒ»¼¶µÄ¿é½«·Ö¸î³É2¸öbuddy, Ò»¸ö±»Õ¼ÓÃ, Ò»¸ö·ÅÈëµÍÒ»¼¶µÄfreelist.
µ±¿é±»ÊÍ·Åʱ, ¼ì²éÿ¶Ôbuddy, Èç¹ûÁ½Õ߶¼¿ÕÏÐ, °ÑËûÃǺϲ¢µ½¸ü¸ßÒ»¼¶µÄ¿éÊý×éÀïÈ¥, ͬʱ·ÅÈë¸ü¸ßÒ»¼¶µÄfreelist. Èç¹ûÒ»¸öbuddy»¹ÔÚ±»ÓÃ, ÄǴ˿齫¼ÓÈëµ½µ±Ç°¼¶µÄfreelist.
Èç¹ûÒ»¸özoneÒѾûÓÐ×ã¹»¿ÕÏÐÒ³£¬¶øÇÒÓÖÐèÒª·ÖÅ䣬ÄÇÉêÇ뽫Í˵½ÏÂÒ»¼¶£¬Ò»°ã˳ÐòÊÇ£ºZONE_HIGHMEM --> ZONE_NORMAL --> ZONE_DMA. Èç¹û¿ÕÏÐÒ³»÷ÖÐpages_lowÃÅÏÞ£¬kswapd½«¿ªÊ¼ÊÍ·ÅÒ³¡£
http://hi.baidu.com/zengzhaonong/blog/item/bd4b15465d4104096b63e584.html
Ò³Ãæ¹ÜÀí»úÖƵijõ²½½¨Á¢
http://hi.baidu.com/mudgao/blog/item/57ebc03ebf065b3771cf6c73.html
ÿ¸öpg_data_tÊý¾Ý½á¹¹´ú±í×ÅһƬ¾ùÔȵġ¢Á¬ÐøµÄÄÚ´æ¿Õ¼ä¡£ÔÚÁ¬Ðø¿Õ¼äUMA½á¹¹ÖУ¬Ö»ÓÐÒ»¸ö½Úµãcontig_page_data£¬¶øÔÚNUMA½á¹¹»ò²»Á¬Ðø¿Õ¼äUMA½á¹¹ÖУ¬Óжà¸öÕâÑùµÄÊý¾Ý½á¹¹¡£
¼ÆËãÈý¸ö¹ÜÀíÇøµÄ´óС£¬²¢´æ·ÅÔÚzones_sizeÊý×éÖС£Èý¸ö¹ÜÀíÇøÊÇ£º
ZONE_DMA£º´Ó0¡«16MB·ÖÅä¸øÕâ¸öÇø
ZONE_NORMAL£º´Ó16MB¡«896MB·ÖÅä¸øÕâ¸öÇø
ZONE_HIGHMEM £º896MBÒÔÉÏ·ÖÅä¸øÕâ¸öÇø
arch/xxx/kernel/head.S
init/main.c: start_kernel()->setup_arch()
arch/xxx/kernel/setup.c->init_bootmem_node()
free_bootmem()
reserve_bootmem()
&nbs
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
ÔÚLinuxϵͳÖУ¬rootÓû§ÊÇÒ»¸öȨÏ޷dz£´óµÄÓû§£¬ÕýÒòΪÆäȨÏÞ´óµ½ÄÜΣ¼°²Ù×÷ϵͳµÄ°²È«£¬ËùÒÔÎÒÃÇƽʱ²Ù×÷µçÄÔµÄʱºò¶¼ÊÇÓõÄÆÕͨÓû§
Ãû£¬Ö»ÓÐÔÚijЩ³¡ºÏÉèÖÃÐèÒª³¬¼¶Óû§È¨ÏÞµÄʱºòÔÙÁÙʱÓÃsuÃüÁîÇл»ÎªrootÓû§¡£²»¹ýÓÐʱºò²»ÏëÈÃÎÒµÄrootÃÜÂë¸æËß±ðÈË£¬µ«ÊÇÒ²Ïë±ðÈË×öһЩ³¬¹ý
ÆÕͨÓû§°²È«¼¶±ðµÄ²Ù×÷Ó¦¸ÃÔõô×öÄØ£ ......
“¹¤ÓûÉÆÆäÊ ±ØÏÈÀûÆäÆ÷”ÏÖÔÚ½«Ò»Ð©³£¼ûµÄµ÷ÊÔ¹¤¾ß½øÐÐÒ»ÏÂ×ܽá.
¡¾1¡¿
Ãû³Æ£ºMEMWATCH
¹¦ÄÜ£º
1¡¢MEMWATCH Ö§³Ö ANSI C
2¡¢ËüÌṩ½á¹ûÈÕÖ¾¼Í¼
3¡¢Äܼì²âË«ÖØÊÍ·Å£¨double-free£©
4¡¢´íÎóÊÍ·Å£¨erroneous f ......
linuxÖÐgrepÃüÁîÏê½â
ÔÚlinuxÖÐgrepÃüÁîÊǷdz£ÓÐÓõÄ,ËüºÍ¹ÜµÀ(|)ÅäºÏʹÓÃ,·Ç³£Ç¿´ó,ÓÃÓÚËÑË÷Îı¾Îļþ.Èç¹ûÏëÒªÔÚ¼¸¸öÎı¾ÎļþÖвéÕÒÒ»×Ö·û´®£¬¿ÉÒÔʹÓÑgrep’ÃüÁî¡£‘grep’ÔÚÎı¾ÖÐËÑË÷Ö¸¶¨µÄ×Ö·û´®¡£
¼ÙÉèÄúÕýÔÚ‘/usr/src/linux/Documentation’Ŀ¼ÏÂËÑË÷´ø×Ö·û´®‘magic&rs ......