函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab_common.c Create Date:2022-07-27 15:54:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:size_t ksize(const void *objp)

返回类型:size_t

参数:

类型参数名称
const void *objp
1773  如果WARN_ON_ONCE(!objp)则返回:0
1788  如果此条件成立可能性小(为编译器优化)(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.)或非__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!则返回:0
1791  size等于__ksize(objp)
1796  kasan_unpoison_shadow(objp, size)
1797  返回:size
调用者
名称描述
__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.
ksize_unpoisons_memory
load_microcode_amd
tomoyo_memory_freemoyo_memory_free - Free memory for elements.*@ptr: Pointer to allocated memory.* Returns nothing.* Caller holds tomoyo_policy_lock mutex.
expand_corenameThe maximal length of core_pattern is also specified in sysctl.c