Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÖеÄÄÚ´æ·ÖÅäºÍÊÍ·ÅÖ®free_bootmem()º¯Êý·ÖÎö

  free_bootmem()Õâ¸öº¯ÊýÊÇϵͳÆô¶¯³õÆÚÄÚ´æÊͷŵĺËÐĺ¯Êý£¬ÎÒÃÇÀ´¿´¿´ËüµÄ´úÂë¡£
  void __init free_bootmem (unsigned long addr, unsigned long size)//addrÊÇÒªÊͷŵÄÎïÀíÆðʼµØÖ·£¬sizeÊÇÒªÊÍ·Å¿Õ¼äµÄ´óС¡£
 {
    free_bootmem_core(NODE_DATA(0)->bdata, addr, size);//Ö±½Ó´ÓÄÚ´ænode0ºÅ¿ªÊ¼ÊÍ·ÅÄÚ´æ¿Õ¼ä¡£
 }//¿ÉÒÔ¿´³öÕæÕýµÄºËÐĺ¯ÊýÊÇfree_bootmem_core()Õâ¸öº¯Êý£¬Õâ¸ö²ÅÊǺËÐIJ¿·Ö¡£ÎÒÃÇÀ´¿´¿´ËüµÄ¾ßÌåÄÚÈÝ°É¡£
  static void __init free_bootmem_core(bootmem_data_t *bdata, unsigned long addr, unsigned long size)
{
    unsigned long i;
    unsigned long start;
    /*
     * round down end of usable mem, partially free pages are
     * considered reserved.
     */
    unsigned long sidx;
    unsigned long eidx = (addr + size - bdata->node_boot_start)/PAGE_SIZE;//¼ÆËã³öÒªÊÍ·Å¿Õ¼äµÄ½áÊøλÖÃÏà¶ÔÓÚ¸ÃÄÚ´æ½ÚµãµÄÆðʼλÖõÄÆ«ÒÆÒ³Êý¡£
    unsigned long end = (addr + size)/PAGE_SIZE;//ÊÍ·Å¿Õ¼ä×îºóλÖõľø¶ÔÒ³ºÅ¡£
    BUG_ON(!size);//Èç¹ûÊÍ·Å¿ÕÄڴ棬ϵͳ±ÀÀ£¡£
    BUG_ON(end > bdata->node_low_pfn);//²»ÄÜÊͷų¬¹ý±¾½Úµã·¶Î§ÄÚµÄÄÚ´æ¿Õ¼ä£¬·ñÔòϵͳ±ÀÀ£¡£
    if (addr < bdata->last_success)
             bdata->last_success = addr;
    /*
     * Round up the beginning of the address.
     */
    start = (addr + PAGE_SIZE-1) / PAGE_SIZE;//ÕâÀï¼ÆË㿪ʼµØÖ·µÄÈ«ÐÂÒ³£¬¼ÙÉèaddrÊÇÔÚ0~4kbµÄµØÖ··¶Î§µÄ»°£¬ÆäʵÕæÕýÔÚ0ºÅÒ³µÄλÖ㬵«ÊÇÈç¹ûͨ¹ýÉÏÃæµÄÔËË㣬Çó³öÀ´µÄ¾ÍÊÇ1ºÅÒ³µÄλÖá£ÎªÊ²Ã´ÕâÑù×öÄØ£¿ÒòΪÈç¹ûÆðʼµØÖ·²»ÊÇ°´Ò³¶ÔÆëµÄ£¬Èç¹ûÖ±½ÓÊÍ·Å£¬¾Í»á°ÑÇ°Ãæ²»ÊôÓÚÕâ¸öÄÚ´ænodeµÄ¿Õ¼äÒ²ÊÍ·ÅÁË¡£
    sidx = start - (bdata->node_boot_start/PAGE_SIZE);//Õâ¸ö¾ÍÊǼÆËãÐÂÒ³ºÍÔ­À´µÄÆðʼµØÖ·ËùÔÚÒ³µÄÆ«ÒÆÒ³Êý¡£
 


Ïà¹ØÎĵµ£º

ɾ³ýLinux°æAdobe ReaderµÄ·½·¨

Linux°æµÄAdobe ReaderµÄÆô¶¯ËÙ¶ÈÌ«ÂýÁË£¬Ã¿´Î´ò¿ªpdfÎĵµµÄʱºò¶¼²»µÃ²»Í¨¹ýÓÒ¼üÀ´Ñ¡ÔñʹÓÃFedora×Ô´øµÄÔĶÁÆ÷£¬ÓеãÂé·³£¬Òò´Ë´òËã°ÑËüɾ³ý¡£ÎÒµÄAdobe ReaderÊÇͨ¹ýAdobeReader.binÀ´°²×°µÄ£¬³¢ÊÔÁËyum remove acroreadºÍrpm -e acroread¶¼ÎÞЧ£¬ºÜÊÇÓôÃÆ¡£Á¬Add/Remove Software¶¼ÕÒ²»µ½¸Ãpackage£¬Òò´ËÒ²²»ÄÜͨ¹ýÕâÖÖ· ......

LinuxÐÂÊÖÒªÁ˽âµÄÊ®¸ö֪ʶµã

LinuxÐÂÊÖÒªÁ˽âµÄÊ®¸ö֪ʶµã
¡¡¡¡1.LinuxÊÇ´óСдÃô¸ÐµÄϵͳ£¬¾Ù¸öÀý×Ó£¬Mozilla, MOZILLA, mOzillaºÍ mozillaÊÇËĸö²»Í¬µÄÃüÁµ«ÊÇÖ»ÓеÚËĸömozillaÊÇÕæÕýÓÐЧµÄÃüÁ¡£»¹ÓУ¬my_filE, my_file,ºÍ my_FILEÊÇÈý¸ö²»Í¬µÄÎļþ¡£Óû§µÄµÇ¼ÃûºÍÃØÃÜÒ²ÊÇ´óСдÃô¸ÐµÄ£¨ÕâÊÇÒòΪUNIXϵͳºÍCÓïÑԵĴ«Í³Ò»ÏòÊÇ´óСдÃô¸ÐËùÖ ......

LinuxÖеÄÄÚ´æÒ³±í´´½¨Ö®memtable_init()º¯Êý·ÖÎö

    ±¾º¯ÊýµÄ·ÖÎöºÜÄѾßÌ壬ÒòΪÉæ¼°Á˺ܶàarmµÄ´¦ÀíÆ÷ÐͺźÍÿ¸öÐͺŶÔÓ¦µÄcacheºÍwrite bufferµÄ¹¤×÷·½Ê½£¬ÕâƬÎÄÕÂÖ»ÊÇ×ö¼òµ¥µÄ¼Ç¼£¬·½±ãÒÔºóÁ˽â¸üÉîºó»ØÀ´ÔÙÀ´ÍêÉÆÕâ¸öº¯Êý¡£
     Õâ¸öº¯ÊýµÄµ÷Óùý³ÌÈ磺start_kernel()->setup_arch()->paging_init()->memtable_init( ......

linuxʱÖÓjiffies¼°ÆäÏà¹Ø


ÔÚLINUXµÄʱÖÓÖжÏÖÐÉæ¼°ÖÁ¶þ¸öÈ«¾Ö±äÁ¿Ò»¸öÊÇxtime,ËüÊÇtimevalÊý¾Ý½á¹¹±äÁ¿£¬ÁíÒ»¸öÔòÊÇjiffies£¬Ê×ÏÈ¿´timeval½á¹¹
struct timeval
{
time_t tv_sec; /***second***/
susecond_t tv_usec;/***microsecond***/
}
µ½µ×microsecondÊǺÁÃ뻹ÊÇ΢Ã룿£¿
1Ã룽1000ºÁÃ루3¸öÁ㣩£¬1Ã룽1000 000΢Ã루6¸öÁ㣩£¬1Ã룽1 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ