Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mempool_create_node

Proto:mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, mempool_free_t *free_fn, void *pool_data, gfp_t gfp_mask, int node_id)

Type:mempool_t

Parameter:

TypeParameterName
intmin_nr
mempool_alloc_t *alloc_fn
mempool_free_t *free_fn
void *pool_data
gfp_tgfp_mask
intnode_id
267  pool = kzalloc_node - allocate zeroed memory from a particular memory node.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).*@node: memory node from which to allocate
268  If Not pool Then Return NULL
271  If mempool_init_node(pool, min_nr, alloc_fn, free_fn, pool_data, gfp_mask, node_id) Then
273  kfree - free previously allocated memory*@objp: pointer returned by kmalloc.* If @objp is NULL, no operation is performed.* Don't free memory not originally allocated by kmalloc()* or you will run into trouble.
274  Return NULL
277  Return pool
Caller
NameDescribe
mempool_createmempool_create - create a memory pool*@min_nr: the minimum number of elements guaranteed to be* allocated for this pool.*@alloc_fn: user-defined element-allocation function.*@free_fn: user-defined element-freeing function.