Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__ksize

Proto:size_t __ksize(const void *object)

Type:size_t

Parameter:

TypeParameterName
const void *object
3922  If Value for the false possibility is greater at compile time(object == ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.* Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault.* ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.* Both make kfree a no-op.) Then Return 0
3925  page = virt_to_head_page(object)
3927  If Value for the false possibility is greater at compile time(!PageSlab(page)) Then
3928  WARN_ON(!PageCompound(page))
3929  Return Returns the number of bytes in this potentially compound page.
3932  Return slab_ksize( not slob )
Caller
NameDescribe
ksizeksize - get the actual amount of memory allocated for a given object*@objp: Pointer to the object* kmalloc may internally round up allocations and return more memory* than requested. ksize() can be used to determine the actual amount of* memory allocated