Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kmem_cache_alloc_bulk

Proto:int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, void **p)

Type:int

Parameter:

TypeParameterName
struct kmem_cache *s
gfp_tflags
size_tsize
void **p
3556  s = slab_pre_alloc_hook(s, flags)
3557  If Not s Then Return 0
3560  cache_alloc_debugcheck_before(s, flags)
3562  local_irq_disable()
3563  When i < size cycle
3564  objp = __do_cache_alloc(s, flags)
3566  If Value for the false possibility is greater at compile time(!objp) Then Go to error
3568  p[i] = objp
3570  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
3572  cache_alloc_debugcheck_after_bulk(s, flags, size, p, _RET_IP_)
3575  If Value for the false possibility is greater at compile time(slab_want_init_on_alloc(flags, s)) Then When i < size cycle
3577  memset(p[i], 0, The size of an object without metadata )
3579  slab_post_alloc_hook(s, flags, size, p)
3581  Return size
3582  error :
3583  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
3584  cache_alloc_debugcheck_after_bulk(s, flags, i, p, _RET_IP_)
3585  slab_post_alloc_hook(s, flags, i, p)
3586  __kmem_cache_free_bulk(s, i, p)
3587  Return 0