函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:分配高速缓存区

函数原型:void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags)

返回类型:void

参数:

类型参数名称
struct kmem_cache *s
gfp_tgfpflags
2772  ret等于slab_alloc(s, gfpflags, _RET_IP_)
2774  trace_kmem_cache_alloc(_RET_IP_, ret, The size of an object without metadata , The size of an object including metadata , gfpflags)
2777  返回:ret
调用者
名称描述
radix_tree_node_allocThis assumes that the caller has performed appropriate preallocation, and* that the caller has pinned this thread of control to the current CPU.
__radix_tree_preloadLoad up this CPU's radix_tree_node buffer with sufficient objects to* ensure that the addition of a single element in the tree cannot fail
xas_nomemxas_nomem() - Allocate memory if needed.*@xas: XArray operation state.*@gfp: Memory allocation flags.* If we need to add new nodes to the XArray, we try to allocate memory* with GFP_NOWAIT while holding the lock, which will usually succeed.
__xas_nomem__xas_nomem() - Drop locks and allocate memory if needed.*@xas: XArray operation state.*@gfp: Memory allocation flags.* Internal variant of xas_nomem().* Return: true if memory was needed, and was successfully allocated.
xas_alloc
kmem_cache_oob
memcg_accounted_kmem_cache
kmem_cache_double_free
kmem_cache_invalid_free
do_kmem_cache_sizeTest kmem_cache with given parameters:
do_kmem_cache_rcu_persistentCheck that the data written to an RCU-allocated object survives* reallocation.
btree_alloc为内存池分配功能
lc_createlc_create - prepares to track objects in an active set*@name: descriptive name only used in lc_seq_printf_stats and lc_seq_dump_details*@max_pending_changes: maximum changes to accumulate until a transaction is required*@e_count: number of elements
vm_area_dup
copy_sighand复制信号句柄
__sigqueue_allocallocate a new signal queue record* - this may be called without locks if and only if t == current, otherwise an* appropriate lock must be held to stop the target task from exiting
alloc_pid分配进程句柄
create_nsproxy
prepare_credsprepare_creds - Prepare a new set of credentials for modification* Prepare a new set of task credentials for modification
prepare_kernel_credprepare_kernel_cred - Prepare a set of credentials for a kernel service*@daemon: A userspace daemon to be used as a reference* Prepare a set of credentials for a kernel service
create_uts_ns
audit_buffer_alloc
__trace_define_field
trace_create_new_event
__kmem_cache_alloc_bulk
split_vmasplit a vma into two pieces at address 'addr', a new vma is allocated either* for the first part or the tail.
ptlock_alloc
anon_vma_alloc
anon_vma_chain_alloc
adjust_va_to_fit_type
zswap_entry_cache_alloc
mpol_newThis function just creates a new policy, does some check and simple* initialization. You must invoke mpol_set_nodemask() to set nodes.
__mpol_dupSlow path of a mempolicy duplicate
sp_alloc
shared_policy_replaceReplace a policy range.
alloc_stable_node
slab_mem_going_online_callback
mem_pool_allocMemory pool allocation and freeing. kmemleak_lock must not be held.
add_scan_areaAdd a scanning area to the object. If at least one such area is added,* kmemleak will only scan these ranges rather than the whole memory block.
cache_alloc_handle
cache_alloc_zspage
alloc_slots
fasync_alloc
__d_alloc__d_alloc - allocate a dcache entry*@sb: filesystem it will belong to*@name: qstr of the name* Allocates a dentry. It returns %NULL if there is insufficient memory* available. On a success the dentry is returned. The name passed in is
alloc_inode
dup_fdAllocate a new files structure and copy contents from the* passed in files structure.* errorp will be valid only when the returned files_struct is NULL.
copy_fs_struct
bdev_alloc_inode
do_blockdev_direct_IOThis is a library function for use by filesystem drivers
fsnotify_attach_connector_to_object
fcntl_dirnotifyWhen a process calls fcntl to attach a dnotify watch to a directory it ends* up here. Allocate both a mark for fsnotify to add and a dnotify_struct to be* attached to the fsnotify_mark.
inotify_new_watch
fanotify_alloc_event
fanotify_add_new_mark
ep_ptable_queue_proc
ep_insertMust be called with "mtx" held.
dup_userfaultfd
SYSCALL_DEFINE1
aio_get_reqaio_get_req* Allocate a slot for an aio request.* Returns NULL if no requests are free.* The refcount is initialized to 2 - one for the async op completion,* one for the synchronous code that does this.
io_ring_ctx_alloc
io_get_req
locks_get_lock_context
mb_cache_entry_createmb_cache_entry_create - create entry in cache*@cache - cache where the entry should be created*@mask - gfp mask with which the entry should be allocated*@key - key of the entry*@value - value of the entry*@reusable - is the entry reusable by others?
alloc_dcookie