Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\frame_vector.c Create Date:2022-07-28 16:34:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ame_vector_create() - allocate & initialize structure for pinned pfns*@nr_frames: number of pfns slots we should reserve* Allocate and initialize struct pinned_pfns to be able to hold @nr_pfns* pfns.

Proto:struct frame_vector *frame_vector_create(unsigned int nr_frames)

Type:struct frame_vector

Parameter:

TypeParameterName
unsigned intnr_frames
206  size = sizeof(structframe_vector) + size of * * nr_frames
208  If WARN_ON_ONCE(nr_frames == 0) Then Return NULL
214  If WARN_ON_ONCE(nr_frames > INT_MAX / size of * / 2) Then Return NULL
220  vec = kvmalloc(size, GFP_KERNEL)
221  If Not vec Then Return NULL
223  Number of frames we have space for = nr_frames
224  Number of frames stored in ptrs array = 0
225  Return vec