函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Check the invariants for the buffer allocated from a slab cache.* If the cache has a test constructor, the first 4 bytes of the object must* always remain equal to CTOR_PATTERN.* If the cache isn't an RCU-typesafe one, or if the allocation is done with

函数原型:static bool __init check_buf(void *buf, int size, bool want_ctor, bool want_rcu, bool want_zero)

返回类型:bool

参数:

类型参数名称
void *buf
intsize
boolwant_ctor
boolwant_rcu
boolwant_zero
170  bool fail = false
172  bytes等于Calculate the number of uninitialized bytes in the buffer.
173  WARN_ON(want_ctor && want_zero)
174  如果want_zero则返回:bytes
176  如果want_ctor
177  如果buf不等于CTOR_PATTERNfail等于1
179  否则
180  如果bytesfail等于非want_rcu
183  返回:fail
调用者
名称描述
do_kmem_cache_sizeTest kmem_cache with given parameters: