函数逻辑报告 |
Source Code:mm\slab.c |
Create Date:2022-07-27 17:16:55 |
Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Calculate the number of objects and left-over bytes for a given buffer size.
函数原型:static unsigned int cache_estimate(unsigned long gfporder, size_t buffer_size, slab_flags_t flags, size_t *left_over)
返回类型:unsigned int
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned long | gfporder | |
size_t | buffer_size | |
slab_flags_t | flags | |
size_t * | left_over |
471 | 如果flags按位与CFLGS_OBJFREELIST_SLAB按位或CFLGS_OFF_SLAB的值则 |
472 | num等于slab_size除buffer_size |
473 | left_over等于slab_size取模buffer_size |
474 | 否则 |
475 | num等于slab_size除buffer_size加sizeof(freelist_idx_t)的和 |
476 | left_over等于slab_size取模buffer_size加sizeof(freelist_idx_t)的和 |
480 | 返回:num |
名称 | 描述 |
---|---|
calculate_slab_order | 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. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |