Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\zsmalloc.c Create Date:2022-07-28 16:26:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:create_cache

Proto:static int create_cache(struct zs_pool *pool)

Type:int

Parameter:

TypeParameterName
struct zs_pool *pool
329  handle_cachep = kmem_cache_create - Create a cache.*@name: A string which is used in /proc/slabinfo to identify this cache.*@size: The size of objects to be created in this cache.*@align: The required alignment for the objects.*@flags: SLAB flags
331  If Not handle_cachep Then Return 1
334  zspage_cachep = kmem_cache_create - Create a cache.*@name: A string which is used in /proc/slabinfo to identify this cache.*@size: The size of objects to be created in this cache.*@align: The required alignment for the objects.*@flags: SLAB flags
336  If Not zspage_cachep Then
337  kmem_cache_destroy(handle_cachep)
338  handle_cachep = NULL
339  Return 1
342  Return 0
Caller
NameDescribe
zs_create_poolzs_create_pool - Creates an allocation pool to work from.*@name: pool name to be created* This function must be called before anything when using* the zsmalloc allocator.* On success, a pointer to the newly created pool is returned,* otherwise NULL.