函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\snapshot.c Create Date:2022-07-27 11:00:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:reate_zone_bm_rtree - Create a radix tree for one zone.* Allocated the mem_zone_bm_rtree structure and initializes it.* This function also allocated and builds the radix tree for the* zone.

函数原型:static struct mem_zone_bm_rtree *create_zone_bm_rtree(gfp_t gfp_mask, int safe_needed, struct chain_allocator *ca, unsigned long start, unsigned long end)

返回类型:struct mem_zone_bm_rtree

参数:

类型参数名称
gfp_tgfp_mask
intsafe_needed
struct chain_allocator *ca
unsigned longstart
unsigned longend
508  pages等于endstart
509  zone等于chain_alloc(ca, sizeof(structmem_zone_bm_rtree))
510  如果非zone则返回:NULL
513  初始化链表头
514  初始化链表头
515  Zone start page frame 等于start
516  Zone end page frame + 1 等于end
517  nr_blocks等于DIV_ROUND_UP(pages, BM_BITS_PER_BLOCK)
519 i小于nr_blocks循环
522  返回:NULL
526  返回:zone
调用者
名称描述
memory_bm_creatememory_bm_create - Allocate memory for a memory bitmap.