Code: Select all
struct page mem_map[MAX_NR_PAGES]
In this file, Linux declares its pointer to the page structs array:
Code: Select all
struct page *mem_map;
EXPORT_SYMBOL(mem_map);
In my approach, I am initializing a buddy allocator which assigns information to a struct page (physical address, order, ...). So to assign those informations to each of the structs, I would need to iterate over my whole 250.000 sized array. Where in Linux does this happen, or if not, how exactly does Linux initialize all page structs, especially at a point where allocation is not set up yet? (Since allocation would only work when page structs are available?)
Hope, you could enlighten me in this pretty crucial matter.