Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pcpu_alloc_test

Proto:static int pcpu_alloc_test(void)

Type:int

Parameter:Nothing

296  rv = 0
298  __percpu * pcpu
302  pcpu = vmalloc(sizeof(void__percpu * ) * 35000)
303  If Not pcpu Then Return -1
306  When i < 35000 cycle
309  get_random_bytes( & r, size of i )
310  size = r % PAGE_SIZE / 4 + 1
315  get_random_bytes( & r, size of i )
316  align = 1 << i % 11 + 1
318  pcpu[i] = allocate one copy of the object for every present
319  If Not pcpu[i] Then rv = -1
323  When i < 35000 cycle free previously allocated percpu memory
326  vfree(pcpu)
328  Return rv