函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__do_krealloc

函数原型:static __always_inline void *__do_krealloc(const void *p, size_t new_size, gfp_t flags)

返回类型:void

参数:

类型参数名称
const void *p
size_tnew_size
gfp_tflags
1662  ks等于0
1664  如果pks等于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
1667  如果ks大于等于new_size
1668  p等于kasan_krealloc((void * )p, new_size, flags)
1669  返回:p
1672  ret等于kmalloc_track_caller(new_size, flags)
1673  如果retp内存复制(ret, p, ks)
1676  返回:ret
调用者
名称描述
__krealloc__krealloc - like krealloc() but don't free @p.*@p: object to reallocate memory for.*@new_size: how many bytes of memory are required.*@flags: the type of memory to allocate.* This function is like krealloc() except it never frees the originally
kreallockrealloc - reallocate memory. The contents will remain unchanged.*@p: object to reallocate memory for.*@new_size: how many bytes of memory are required.*@flags: the type of memory to allocate.* The contents of the object pointed to are preserved up to the