函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.h Create Date:2022-07-27 15:27:21
Last Modify:2022-05-23 16:25:42 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:cache_from_obj

函数原型:static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)

返回类型:struct kmem_cache

参数:

类型参数名称
struct kmem_cache *s
void *x
515  如果非memcg_kmem_enabled()且非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SLAB_FREELIST_HARDENED)且非此条件成立可能性小(为编译器优化)(Used for retrieving partial slabs, etc. & DEBUG: Perform (expensive) checks on alloc/free )则返回:s
520  cachep等于virt_to_cache(x)
521  WARN_ONCE(cachep && !slab_equal_or_root(cachep, s), "%s: Wrong slab cache. %s but object is from %s\n", __func__, Name (only for display!) , Name (only for display!) )
524  返回:cachep
调用者
名称描述
kmem_cache_freekmem_cache_free - Deallocate an object*@cachep: The cache the allocation was from.*@objp: The previously allocated object.* Free an object which was previously allocated from this* cache.
kmem_cache_free_bulk
kmem_cache_free
build_detached_freelistThis 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