Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:To avoid unnecessary overhead, we pass through large allocation requests* directly to the page allocator. We use __GFP_COMP, because we will need to* know the allocation order to free the pages properly in kfree.

Proto:void *kmalloc_order(size_t size, gfp_t flags, unsigned int order)

Type:void

Parameter:

TypeParameterName
size_tsize
gfp_tflags
unsigned intorder
1320  void * ret = NULL
1323  flags |= __GFP_COMP
1324  page = alloc_pages(flags, order)
1325  If Value is more likely to compile time(page) Then
1326  ret = page_address(page)
1327  mod_node_page_state(page_pgdat(page), NR_SLAB_UNRECLAIMABLE, 1 << order)
1330  ret = kasan_kmalloc_large(ret, size, flags)
1332  kmemleak_alloc(ret, size, 1, flags)
1333  Return ret
Caller
NameDescribe
kmalloc_order_trace