函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:full_fit_alloc_test

函数原型:static int full_fit_alloc_test(void)

返回类型:int

参数:

227  rv等于负1
230  junk_length等于ls - find last set bit in word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffs, but returns the position of the most significant set bit.* fls(value) returns 0 if value is 0 or the position of the last
231  junk_length乘等于32乘1024乘1024除PAGE_SIZE
233  ptr等于vmalloc(*的长度 * junk_length)
234  如果非ptr则返回:rv
237  junk_ptr等于vmalloc(*的长度 * junk_length)
238  如果非junk_ptr
239  vfree(ptr)
240  返回:rv
243 i小于junk_length循环
244  ptr[i]等于vmalloc(1 * PAGE_SIZE)
245  junk_ptr[i]等于vmalloc(1 * PAGE_SIZE)
248 i小于junk_length循环vfree(junk_ptr[i])
251 i小于test_loop_count循环
252  tmp等于vmalloc(1 * PAGE_SIZE)
254  如果非tmp则转到:error
257  *tmp等于1
258  vfree(tmp)
262  rv等于0
264  error :
265 i小于junk_length循环vfree(ptr[i])
268  vfree(ptr)
269  vfree(junk_ptr)
271  返回:rv