lkml.org 
[lkml]   [1999]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    Subjectmem_map bitmaps ?
    I'm reading linux source code, and confused by bitmap size of mem_map.
    In free_area_init() ( init.c , kernel 2.0.35 )
    ...
    for ( i = 0; i < NR_MEM_LISTS; i++ ) {
    unsigned long bitmap_size ;
    init_mem_queue(free_area+i) ;
    mask+=mask ;
    end_mem = (end_mem + ~mask) &mask ;
    bitmap_size = (end_mem - PAGE_OFFSET) >> (PAGE_SHIFT+i) ;
    ???????????????
    bitmap_size = (bitmap_size+7) >> 3 ;
    ...
    }

    on bit of free_area[i].map represent 2^(i+1) pages, so I think the line
    with ????
    should be:
    bitmap_size = (end_mem - PAGE_OFFSET ) >> (PAGE_SHIFT+i+1) ;

    I know I would be error, but can anybody explain it to me, thanks very
    much !!!!!



    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:51    [W:0.019 / U:59.560 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site