函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\slab_def.h Create Date:2022-07-27 15:26:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:We want to avoid an expensive divide : (offset / cache->size)* Using the fact that size is a constant for a particular cache,* we can replace (offset / cache->size) by* reciprocal_divide(offset, cache->reciprocal_buffer_size)

函数原型:static inline unsigned int obj_to_index(const struct kmem_cache *cache, const struct page *page, void *obj)

返回类型:unsigned int

参数:

类型参数名称
const struct kmem_cache *cache
const struct page *page
void *obj
113  offset等于obj slab: first object
114  返回:reciprocal_divide(offset, reciprocal_buffer_size)
调用者
名称描述
slab_put_obj
assign_tagThis function assigns a tag to an object considering the following:* 1