Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmalloc.c Create Date:2022-07-28 14:58:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Find the first free block(lowest start address) in the tree,* that will accomplish the request corresponding to passing* parameters.

Proto:static __always_inline struct vmap_area *find_vmap_lowest_match(unsigned long size, unsigned long align, unsigned long vstart)

Type:struct vmap_area

Parameter:

TypeParameterName
unsigned longsize
unsigned longalign
unsigned longvstart
802  node = rb_node
805  length = size + align - 1
807  When node cycle
808  va = rb_entry(node, structvmap_area, rb_node)
812  node = rb_left
813  Else
814  If is_within_this_va(va, size, align, vstart) Then Return va
823  node = rb_right
824  Continue
832  When node = rb_parent(node) cycle
833  va = rb_entry(node, structvmap_area, rb_node)
834  If is_within_this_va(va, size, align, vstart) Then Return va
839  node = rb_right
840  Break
846  Return NULL
Caller
NameDescribe
__alloc_vmap_areaReturns a start address of the newly allocated area, if success.* Otherwise a vend is returned that indicates failure.