Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:random_size_align_alloc_test

Proto:static int random_size_align_alloc_test(void)

Type:int

Parameter:Nothing

81  When i < test_loop_count cycle
82  get_random_bytes( & rnd, size of rnd )
87  align = 1 << rnd % 23
92  size = ( rnd % 10 + 1) * PAGE_SIZE
94  ptr = __vmalloc_node_range - allocate virtually contiguous memory*@size: allocation size*@align: desired alignment*@start: vm area range start*@end: vm area range end*@gfp_mask: flags for the page level allocator*@prot: protection mask for the allocated pages
100  If Not ptr Then Return -1
103  vfree(ptr)
106  Return 0