函数逻辑报告 |
Source Code:mm\slub.c |
Create Date:2022-07-27 17:22:40 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:This function progressively scans the array with free objects (with* a limited look ahead) and extract objects belonging to the same* page. It builds a detached freelist directly within the given* page/objects. This can happen without any need for
函数原型:static inline int build_detached_freelist(struct kmem_cache *s, size_t size, void **p, struct detached_freelist *df)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct kmem_cache * | s | |
size_t | size | |
void ** | p | |
struct detached_freelist * | df |
3050 | first_skipped_index等于0 |
3051 | lookahead等于3 |
3056 | page = NULL |
3058 | 循环 |
3063 | 如果非object则返回:0 |
3066 | page等于virt_to_head_page(object) |
3067 | 如果非s则 |
3069 | 如果此条件成立可能性小(为编译器优化)(!PageSlab(page))则 |
3070 | BUG_ON(!PageCompound(page)) |
3071 | kfree_hook(object) |
3072 | __free_pages(page, compound_order(page)) |
3074 | 返回:size |
3077 | s等于用于SLUB分配器,指向slab的指针 |
3078 | 否则 |
3079 | s等于cache_from_obj(s, object) |
3084 | set_freepointer(s, object, NULL) |
3088 | cnt等于1 |
3092 | 如果非object则继续下一循环 |
3096 | 如果page恒等于virt_to_head_page(object)则 |
3110 | 如果非first_skipped_index则first_skipped_index等于size加1 |
3114 | 返回:first_skipped_index |
名称 | 描述 |
---|---|
kmem_cache_free_bulk | Note that interrupts must be enabled when calling this function. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |