Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slob.c Create Date:2022-07-28 15:35:58
Last Modify:2022-05-20 09:26:42 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static void *slob_page_alloc(struct page *sp, size_t size, int align, int align_offset, bool *page_removed_from_list)

Type:void

Parameter:

TypeParameterName
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  cycle
245  avail = Return the size of a slob block.
254  If align Then
258  delta = aligned - cur
260  If avail >= units + delta Then
263  If delta Then
273  If avail == units Then
278  Else
286  SLOB -= units
287  If Not SLOB Then
291  Return cur
293  If Returns true if s is the last free block in its page. Then Return NULL
Caller
NameDescribe
slob_allocslob_alloc: entry point into the slob allocator.