函数逻辑报告 |
Source Code:mm\slab.c |
Create Date:2022-07-27 17:18:38 |
| Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Get the memory for a slab management obj.* For a slab cache when the slab descriptor is off-slab, the* slab descriptor can't come from the same cache which is being created,* Because if it is the case, that means we defer the creation of
函数原型:static void *alloc_slabmgmt(struct kmem_cache *cachep, struct page *page, int colour_off, gfp_t local_flags, int nodeid)
返回类型:void
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct kmem_cache * | cachep | |
| struct page * | page | |
| int | colour_off | |
| gfp_t | local_flags | |
| int | nodeid |
| 2347 | addr等于page_address(page) |
| 2349 | slab: first object 等于addr加colour_off |
| 2350 | SLAB 等于0 |
| 2352 | 如果OBJFREELIST_SLAB(cachep)则freelist = NULL |
| 2356 | freelist等于在指定节点上分配一个对象 |
| 2358 | 如果非freelist则返回:NULL |
| 2360 | 否则 |
| 2362 | freelist等于addr加PAGE_SIZE左移gfporder位的值减freelist_size |
| 2366 | 返回:freelist |
| 名称 | 描述 |
|---|---|
| cache_grow_begin | Grow (by 1) the number of slabs within a cache. This is called by* kmem_cache_alloc() when there are no active objs left in a cache. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |