函数逻辑报告 |
Source Code:mm\vmalloc.c |
Create Date:2022-07-27 16:30:05 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__vmalloc_area_node
函数原型:static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot, int node)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct vm_struct * | area | |
gfp_t | gfp_mask | |
pgprot_t | prot | |
int | node |
2454 | highmem_mask等于如果gfp_mask按位与GFP_DMA按位或GFP_DMA32的值则0否则__GFP_HIGHMEM |
2459 | array_size等于nr_pages乘*的长度 |
2462 | 如果array_size大于PAGE_SIZE则 |
2463 | pages等于__vmalloc_node(array_size, 1, nested_gfp | highmem_mask, PAGE_KERNEL, node, caller) |
2465 | 否则 |
2466 | pages等于kmalloc_node(array_size, nested_gfp, node) |
2469 | 如果非pages则 |
2471 | 释放内存 |
2472 | 返回:NULL |
2481 | 如果node恒等于NUMA_NO_NODE则page等于alloc_page(alloc_mask | highmem_mask) |
2483 | 否则page等于Allocate pages, preferring the node given as nid. When nid == NUMA_NO_NODE,* prefer the current CPU's closest node. Otherwise node must be valid and* online. |
2486 | 如果此条件成立可能性小(为编译器优化)(!page)则 |
2493 | 如果gfpflags_allow_blocking(gfp_mask)则cond_resched() |
2496 | atomic_long_add(nr_pages, & nr_vmalloc_pages) |
2498 | 如果map_vm_area(area, prot, pages)则转到:fail |
2500 | 返回:addr |
2502 | fail : |
2503 | warn_alloc(gfp_mask, NULL, "vmalloc: allocation failure, allocated %ld of %ld bytes", (nr_pages * PAGE_SIZE), size) |
2507 | 返回:NULL |
名称 | 描述 |
---|---|
__vmalloc_node_range | __vmalloc_node_range - allocate virtually contiguous memory*@size: allocation size*@align: desired alignment*@start: vm area range start*@end: vm area range end*@gfp_mask: flags for the page level allocator*@prot: protection mask for the allocated pages |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |