Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ksize - 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

Proto:size_t ksize(const void *objp)

Type:size_t

Parameter:

TypeParameterName
const void *objp
1773  If WARN_ON_ONCE(!objp) Then Return 0
1788  If Value for the false possibility is greater at compile time(objp == 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.) || Not __kasan_check_*: Always available when KASAN is enabled. This may be used* even in compilation units that selectively disable KASAN, but must use KASAN* to validate access to an address. Never use these in header files! Then Return 0
1791  size = __ksize(objp)
1796  kasan_unpoison_shadow(objp, size)
1797  Return size
Caller
NameDescribe
__do_krealloc
kzfreekzfree - like kfree but zero memory*@p: object to free memory of* The memory of the object @p points to is zeroed before freed.* If @p is %NULL, kzfree() does nothing.* Note: this function zeroes the whole allocated buffer which can be a good
kobjsizeReturn the total memory allocated for this pointer, not* just what the caller asked for.* Doesn't have to be accurate, i.e. may have races.
tomoyo_memory_okmoyo_memory_ok - Check memory quota.*@ptr: Pointer to allocated memory.* Returns true on success, false otherwise.* Returns true if @ptr is not NULL and quota not exceeded, false otherwise.* Caller holds tomoyo_policy_lock mutex.