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:
committed by
Masamichi Takagi
parent
2dd8687974
commit
8efced7bf7
17
test/issues/1183/Makefile
Normal file
17
test/issues/1183/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
CC = gcc
|
||||
TARGET=hugemap
|
||||
|
||||
CPPFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
hugemap: hugemap.c
|
||||
$(CC) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
test: all
|
||||
@sh ./C1183.sh
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) *.o
|
||||
|
||||
Reference in New Issue
Block a user