Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\snapshot.c Create Date:2022-07-28 10:00:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:chain_alloc

Proto:static void *chain_alloc(struct chain_allocator *ca, unsigned int size)

Type:void

Parameter:

TypeParameterName
struct chain_allocator *ca
unsigned intsize
279  If struct linked_page is used to build chains of pages - al size of objects allocated outof the current page < size Then
282  lp = If set, only "safe" pages are allocated Then __get_safe_page(mask for allocating pages ) Else get_image_page - Allocate a page for a hibernation image
284  If Not lp Then Return NULL
287  next = he chain
288  he chain = lp
289  al size of objects allocated outof the current page = 0
291  ret = data + al size of objects allocated outof the current page
292  al size of objects allocated outof the current page += size
293  Return ret
Caller
NameDescribe
alloc_rtree_nodealloc_rtree_node - Allocate a new node and add it to the radix tree.* This function is used to allocate inner nodes as well as the* leave nodes of the radix tree. It also adds the node to the* corresponding linked list passed in by the *list parameter.
create_zone_bm_rtreereate_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.
get_bufferget_buffer - Get the address to store the next image data page.* Get the address that snapshot_write_next() should return to its caller to* write to.