Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.h Create Date:2022-07-28 14:04:18
Last Modify:2022-05-23 16:25:42 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cache_from_obj

Proto:static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)

Type:struct kmem_cache

Parameter:

TypeParameterName
struct kmem_cache *s
void *x
515  If Not memcg_kmem_enabled() && Not IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_SLAB_FREELIST_HARDENED) && Not Value for the false possibility is greater at compile time(Used for retrieving partial slabs, etc. & DEBUG: Perform (expensive) checks on alloc/free ) Then Return 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  Return cachep
Caller
NameDescribe
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