Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__do_kmalloc - allocate memory*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).*@caller: function caller for debug tracking of the caller* Return: pointer to the allocated memory or %NULL in case of error

Proto:static __always_inline void *__do_kmalloc(size_t size, gfp_t flags, unsigned long caller)

Type:void

Parameter:

TypeParameterName
size_tsize
gfp_tflags
unsigned longcaller
3697  If Value for the false possibility is greater at compile time(size > Maximum size for which we actually use a slab cache ) Then Return NULL
3699  cachep = kmalloc_slab(size, flags)
3700  If Value for the false possibility is greater at compile time(ZERO_OR_NULL_PTR(cachep)) Then Return cachep
3702  ret = slab_alloc(cachep, flags, caller)
3704  ret = kasan_kmalloc(cachep, ret, size, flags)
3705  trace_kmalloc(caller, ret, size, The size of an object including metadata , flags)
3708  Return ret
Caller
NameDescribe
__kmalloc
__kmalloc_track_caller