函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slob.c Create Date:2022-07-27 17:09:22
Last Modify:2022-05-20 09:26:42 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:slob_page_alloc() - Allocate a slob block within a given slob_page sp.*@sp: Page to look in.*@size: Size of the allocation.*@align: Allocation alignment.*@align_offset: Offset in the allocated block that will be aligned.

函数原型:static void *slob_page_alloc(struct page *sp, size_t size, int align, int align_offset, bool *page_removed_from_list)

返回类型:void

参数:

类型参数名称
struct page *sp
size_tsize
intalign
intalign_offset
bool *page_removed_from_list
240  slob_t * prev, * cur, * aligned = NULL
241  delta等于0, units等于SLOB_UNITS(size)
243  * page_removed_from_list = false
244  循环
245  avail等于Return the size of a slob block.
254  如果align
258  delta等于alignedcur
260  如果avail大于等于unitsdelta
263  如果delta
273  如果avail恒等于units
278  否则
286  SLOB 减等于units
287  如果非 SLOB
291  返回:cur
293  如果Returns true if s is the last free block in its page.则返回:NULL
调用者
名称描述
slob_allocslob_alloc: entry point into the slob allocator.