mmap: Check if size exceeds available memory when MAP_HUGETLB

If size exceeds, mmap fails and set -ENOMEM

Change-Id: I4f0d6e18ee3a7c8e32e251b7ed07ee9f76305603
Refs: #1183
This commit is contained in:
Ken Sato
2019-07-02 15:42:13 +09:00
committed by Masamichi Takagi
parent 2dd8687974
commit 8efced7bf7
11 changed files with 542 additions and 0 deletions

View File

@ -0,0 +1,6 @@
MEMALL=10
BOOTPARAM="-c 1-7,9-15 -m ${MEMALL}G@0 -r 1-7:0+9-15:8 -O"
OVERSIZE=`expr ${MEMALL} + 1`
INSIZE=`expr ${MEMALL} / 2`
PGSHIFT_LIST=(0 16 21 25 30)
MULTI_MAP_RESULT=(1 1 1 0 0)