函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\percpu.c Create Date:2022-07-27 15:50:15
Last Modify:2022-05-23 13:52:24 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pcpu_mem_zalloc - allocate memory*@size: bytes to allocate*@gfp: allocation flags* Allocate @size bytes. If @size is smaller than PAGE_SIZE,* kzalloc() is used; otherwise, the equivalent of vzalloc() is used.

函数原型:static void *pcpu_mem_zalloc(size_t size, gfp_t gfp)

返回类型:void

参数:

类型参数名称
size_tsize
gfp_tgfp
505  如果WARN_ON_ONCE(!slab_is_available())则返回:NULL
508  如果size小于等于PAGE_SIZE则返回:分配内存并置零
510  否则返回:__vmalloc(size, gfp | __GFP_ZERO, PAGE_KERNEL)
调用者
名称描述
pcpu_alloc_chunk
pcpu_get_pagespcpu_get_pages - get temp pages array* Returns pointer to array of pointers to struct page which can be indexed* with pcpu_page_idx(). Note that there is only one array and accesses* should be serialized by pcpu_alloc_mutex.* RETURNS: