函数逻辑报告 |
Source Code:mm\slab.c |
Create Date:2022-07-27 17:18:03 |
Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:alculate_slab_order - calculate size (page order) of slabs*@cachep: pointer to the cache that is being created*@size: size of objects to be created in this cache.*@flags: slab allocation flags* Also calculates the number of objects per slab.
函数原型:static size_t calculate_slab_order(struct kmem_cache *cachep, size_t size, slab_flags_t flags)
返回类型:size_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct kmem_cache * | cachep | |
size_t | size | |
slab_flags_t | flags |
1705 | left_over等于0 |
1713 | 如果非num则继续下一循环 |
1717 | 如果num大于SLAB_OBJ_MAX_NUM则退出 |
1720 | 如果flags按位与CFLGS_OFF_SLAB则 |
1724 | freelist_size等于num乘sizeof(freelist_idx_t) |
1725 | freelist_cache等于kmalloc_slab(freelist_size, 0u) |
1726 | 如果非freelist_cache则继续下一循环 |
1733 | 如果OFF_SLAB(freelist_cache)则继续下一循环 |
1737 | 如果The size of an object including metadata 大于The size of an object including metadata 除2则继续下一循环 |
1751 | 如果flags按位与Objects are reclaimable 则退出 |
1758 | 如果gfporder大于等于slab_max_order则退出 |
1767 | 返回:left_over |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |