On Nov 3, 2007 11:58 AM, Wang Yu <wangyuict@xxxxxxxxx> wrote: > Hi, all > Boot memory allocator is used to allocate core kernel structures before > start_kernel() is invoked, and boot memory allocator is associated with > struct bootmem_data existing for each node of memory in the system. My > question is who will allocate the struct bootmem_data for boot memory > allocator? and who will allocate the struct pg_data_t for each node? Looking at one particular instance: ./arch/m68k/mm/init.c: static bootmem_data_t __initdata bootmem_data[MAX_NUMNODES]; This means that the memory is assigned AT COMPILE TIME, ie, the gcc compiler will allocate a fixed memory address to the variable, and compile into the generated ELF. When the ELF is loaded into memory, the space will be automatically allocated by the ELF loader, and among the space is the variable for the bootmem_data[]. Our ELF in this case is the vmlinuz file - a gzip ELF file. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ