Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:hugepage_new_subpool

Proto:struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages, long min_hpages)

Type:struct hugepage_subpool

Parameter:

TypeParameterName
struct hstate *h
longmax_hpages
longmin_hpages
99  spool = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
100  If Not spool Then Return NULL
103  Process spin lock initialization( & lock)
104  count = 1
105  Maximum huge pages or -1 if no maximum. = max_hpages
106  both alloced and reserved pages. = h
107  Minimum huge pages or -1 if no minimum. = min_hpages
109  If min_hpages != -1 && Forward declaration Then
110  kfree(spool)
111  Return NULL
113  Pages reserved against global pool to = min_hpages
115  Return spool