函数逻辑报告 |
Source Code:mm\slub.c |
Create Date:2022-07-27 17:22:22 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Inlined fastpath so that allocation functions (kmalloc, kmem_cache_alloc)* have the fastpath folded into their functions. So no function call* overhead for requests that can be satisfied on the fastpath.
函数原型:static __always_inline void *slab_alloc_node(struct kmem_cache *s, gfp_t gfpflags, int node, unsigned long addr)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct kmem_cache * | s | |
gfp_t | gfpflags | |
int | node | |
unsigned long | addr |
2683 | s等于slab_pre_alloc_hook(s, gfpflags) |
2684 | 如果非s则返回:NULL |
2686 | redo : |
2697 | 循环 |
2698 | tid等于Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.( Globally unique transaction id ) |
2699 | c等于raw_cpu_ptr(cpu_slab) |
2700 | 当IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_PREEMPT)且此条件成立可能性小(为编译器优化)(tid != READ_ONCE( Globally unique transaction id ))循环 |
2725 | 否则 |
2726 | next_object等于get_freepointer_safe(s, object) |
2747 | note_cmpxchg_failure("slab_alloc", s, tid) |
2748 | 转到:redo |
2750 | prefetch_freepointer(s, next_object) |
2751 | stat(s, Allocation from cpu slab ) |
2756 | 如果此条件成立可能性小(为编译器优化)(slab_want_init_on_alloc(gfpflags, s))且object则memset(object, 0, The size of an object without metadata ) |
2759 | slab_post_alloc_hook(s, gfpflags, 1, & object) |
2761 | 返回:object |
名称 | 描述 |
---|---|
slab_alloc | |
kmem_cache_alloc_node | 在指定节点上分配一个对象 |
__kmalloc_node | |
__kmalloc_node_track_caller | |
kmem_cache_alloc_node | 在指定节点上分配一个对象 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |