函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab_common.c Create Date:2022-07-27 15:54:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:void *kmalloc_order(size_t size, gfp_t flags, unsigned int order)

返回类型:void

参数:

类型参数名称
size_tsize
gfp_tflags
unsigned intorder
1320  void * ret = NULL
1323  flags或等于__GFP_COMP
1324  page等于alloc_pages(flags, order)
1325  如果此条件成立可能性大(为编译器优化)(page)则
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  返回:ret
调用者
名称描述
kmalloc_order_trace