I am going through the memory initialization code in linux kernel, and I can see the number of free pages for each order and migration type for the each memory zone in a memory node is set to 0.
static void __meminit zone_init_free_lists(struct zone *zone){int order, t; for_each_migratetype_order(order, t) { INIT_LIST_HEAD(&zone->free_area[order].free_list[t]); zone->free_area[order].nr_free = 0;}} I am not able to figure out how the list is set to the proper state, as in which order has how many default pages to to start with, or we start with all entries in the highest order. In the book, I read the following: The number of free pages (nr_free) is still currently defined as 0, and this obviously does not reflect the true situation. The correct value is not set until the bootmem allocator is disabled and normal buddy allocation comes into effect. Can someone point to the actual location where this part is set to the default starting value? -- -- unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel --- You received this message because you are subscribed to the Google Groups "Android Linux Kernel Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-kernel+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.