Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kvmalloc_node - attempt to allocate physically contiguous memory, but upon* failure, fall back to non-contiguous (vmalloc) allocation

Proto:void *kvmalloc_node(size_t size, gfp_t flags, int node)

Type:void

Parameter:

TypeParameterName
size_tsize
gfp_tflags
intnode
550  kmalloc_flags = flags
557  If (flags & GFP_KERNEL) != GFP_KERNEL Then Return kmalloc_node(size, flags, node)
567  If size > PAGE_SIZE Then
568  kmalloc_flags |= DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.
570  If Not (kmalloc_flags & __GFP_RETRY_MAYFAIL) Then kmalloc_flags |= __GFP_NORETRY
574  ret = kmalloc_node(size, kmalloc_flags, node)
580  If ret || size <= PAGE_SIZE Then Return ret
583  Return __vmalloc_node_flags_caller(size, node, flags, __builtin_return_address(0))
Caller
NameDescribe
test_kvmalloc_nodeAllocator uses a trailing node argument --------+ (e.g. kmalloc_node())* Allocator uses the gfp_t argument -----------+ | (e.g. kmalloc())* Allocator uses a special leading argument + | | (e.g. devm_kmalloc())* | | |