Messages in this thread | | | Date | Thu, 20 May 1999 20:50:45 +0800 | From | wu_yb <> | Subject | mem_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/
| |