启动时内存管理
https://www.kernel.org/doc/html/v4.19/core-api/boot-time-mm.html#bootmem
A specialized allocator called memblock performs the boot time memory management.
The architecture specific initialization must set it up in setup_arch and tear it down in mem_init functions.
变更
- 自从 v4.19-11831-g355c45affca7之后,内核不再支持bootmem原始方案,所有的架构都采用MEMBLOCK + NO_BOOTMEM方案管理启动时的内存。
- 自从v4.19-11856-g57c8a661d95d之后,原先采用bootmem.h中的接口均被删除,之后统一使用memblock.h。
API
https://github.com/torvalds/linux/blob/master/include/linux/memblock.h