Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Returns a start address of the newly allocated area, if success.* Otherwise a vend is returned that indicates failure.

Proto:static __always_inline unsigned long __alloc_vmap_area(unsigned long size, unsigned long align, unsigned long vstart, unsigned long vend)

Type:unsigned long

Parameter:

TypeParameterName
unsigned longsize
unsigned longalign
unsigned longvstart
unsigned longvend
1034  va = Find the first free block(lowest start address) in the tree,* that will accomplish the request corresponding to passing* parameters.
1035  If Value for the false possibility is greater at compile time(!va) Then Return vend
1038  If va_start > vstart Then nva_start_addr = @a is a power of 2 value (va_start, align)
1040  Else nva_start_addr = @a is a power of 2 value (vstart, align)
1044  If nva_start_addr + size > vend Then Return vend
1048  type = classify_va_fit_type(va, nva_start_addr, size)
1049  If WARN_ON_ONCE(type == NOTHING_FIT) Then Return vend
1053  ret = adjust_va_to_fit_type(va, nva_start_addr, size, type)
1054  If ret Then Return vend
1061  Return nva_start_addr
Caller
NameDescribe
alloc_vmap_areaAllocate a region of KVA of the specified size and alignment, within the* vstart and vend.