
memblock 分配器 涉及到 内存块 类型 , 在 Linux 内核中 , 使用 struct memblock_type 结构体 描述 ,
struct memblock_type 结构体 定义在 Linux 内核源码的 linux-4.12\include\linux\memblock.h#40 位置 ;
struct memblock_type {
unsigned long cnt; /* number of regions */
unsigned long max; /* size of the allocated array */
phys_addr_t total_size; /* size of all regions */
struct memblock_region *regions;
char *name;
};源码路径 : linux-4.12\include\linux\memblock.h#40

memblock_type 结构体成员分析 :
cnt 成员 表示 当前 管理的 " 内存区域 " 个数 ;
unsigned long cnt; /* number of regions */max 成员 表示 当前 管理的 " 内存区域 " 最大个数 ;
unsigned long max; /* size of the allocated array */total_size 成员 表示 当前 所有内存块 的总大小 ;
phys_addr_t total_size; /* size of all regions */regions 成员 表示 的指针 指向 " 执行内存区域 " ;
struct memblock_region *regions;name 成员 表示 " 内存块类型 " 的名称 ;
char *name;