Hi, When I'm trace uml kernel with gdb, I found there are two mem_map (struct page) arrays.
1) the first one created in init_maps function, and pointed by *local* pointer struct page *map in init_maps function arch/um/kernel/um_arch.c 264 int __init linux_main(int argc, char **argv) ..... 350 setup_physmem(uml_physmem, uml_reserved, physmem_size, highmem); 351 if (init_maps(physmem_size, iomem_size, highmem)) { 352 printf("Failed to allocate mem_map for %Lu bytes of physical " 353 "memory and %Lu bytes of highmem\n", physmem_size, 354 highmem); 355 exit(1); 356 } 2) the second mem_map created in start_kernel -> setup_arch -> paging_init -> free_area_init -> free_area_init_core -> alloc_node_mem_map and it has been pointer by global pointer "contig_page_data->node_mem_map" Why need struct page array (the first one) for boot memory allocate? I tried to deleted the 351~356 lines in linux_main function and the built/run the uml kernel. The new kernel can boot and run. But it may panic. Thanks ------------------------------------------------------------------------------ Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel