Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_meminit.c Create Date:2022-07-28 06:37:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Test kmalloc() with given parameters.

Proto:static int __init do_kmalloc_size(size_t size, int *total_failures)

Type:int

Parameter:

TypeParameterName
size_tsize
int *total_failures
102  buf = kmalloc(size, GFP_KERNEL)
103  fill_with_garbage(buf, size)
104  kfree(buf)
106  buf = kmalloc(size, GFP_KERNEL)
107  If Calculate the number of uninitialized bytes in the buffer. Then total_failures++
109  fill_with_garbage(buf, size)
110  kfree(buf)
111  Return 1
Caller
NameDescribe
test_kvmallocTest kmalloc()/vmalloc() by allocating objects of different sizes.