Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-28 15:44:20
Last Modify:2022-05-23 17:02:55 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:set_objfreelist_slab_cache

Proto:static bool set_objfreelist_slab_cache(struct kmem_cache *cachep, size_t size, slab_flags_t flags)

Type:bool

Parameter:

TypeParameterName
struct kmem_cache *cachep
size_tsize
slab_flags_tflags
1861  num = 0
1868  If Value for the false possibility is greater at compile time(slab_want_init_on_free(cachep)) Then Return false
1871  If ctor || flags & Defer freeing slabs to RCU Then Return false
1874  left = 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.
1876  If Not num Then Return false
1879  If num * sizeof(freelist_idx_t) > The size of an object without metadata Then Return false
1882  colour = left / colour_off
1884  Return true
Caller
NameDescribe
__kmem_cache_create__kmem_cache_create - Create a cache.*@cachep: cache management descriptor*@flags: SLAB flags* Returns a ptr to the cache on success, NULL on failure.* Cannot be called within a int, but can be interrupted.