Webbinit_currently_empty_zone用来初始化与伙伴系统相关的 free_aera 列表。该函数首先调用 memmap_init_zone 初始化上文分配好的保存在全局变量 mem_map 中的物理内存的 struct page 实例。然后调用 zone_init_free_lists 初始化 free_aera 空闲列表。 http://bricktou.com/mm/page_alloczone_init_free_lists.html
zone_init_free_lists
Webbinit_currently_empty_zone初始化free_area列表,并将属于该内存域的所有page实例都设置为初始默认值。 正如前文的讨论,调用了memmap_init_zone来初始化内存域的页 … WebbLKML Archive on lore.kernel.org help / color / mirror / Atom feed From: Reza Arbab To: Michal Hocko Cc: linux … shoreline circle apartments virginia beach
page_alloc.c
Webb21 apr. 2024 · 伙伴系统承担内核初始完后的物理内存管理工作,负责管理各个zone中的物理内存分配,释放。 其基本工作原理如下: 把内存按照页划分成很多阶,最大阶为MAX_ORDER,一般设置为11,每个阶内存区的内存块数为2^n,我们称之为 内存区 。 当进程申请一段内存时,总是从适合大小的阶中分配指定 内存区 ,比如当分配7k (4k * … Webb26 apr. 2024 · init_currently_empty_zone()则主要是初始化管理区的等待队列哈希表和等待队列,同时还初始化了与伙伴系统相关的 free_area 列表. nr_kernel_pages … Webbpage_is_buddy. This function checks whether a page is free && is the buddy * we can coalesce a page and its buddy if * (a) the buddy is not in a hole (check before calling!) && * (b) the buddy is in the buddy system && * (c) a page and its buddy have the same order && * (d) a page and its buddy are in the same zone. shoreline circle sanford fl