From 1ebd0e3345fb6f66522e8c837174a3544e080aad Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sat, 18 Oct 2014 12:20:42 +0000 Subject: The MAP_NORESERVE flag to mmap() has never been implemented in FreeBSD and is being removed. No portrev bump needed since the kernel will continue to accept this flag for old binaries even after support for it in new binaries is removed. PR: 193961 Approved by: portmgr (antoine) --- lang/ccl/files/patch-lisp-kernel_memory.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lang/ccl/files/patch-lisp-kernel_memory.c (limited to 'lang/ccl') diff --git a/lang/ccl/files/patch-lisp-kernel_memory.c b/lang/ccl/files/patch-lisp-kernel_memory.c new file mode 100644 index 000000000000..24dffad467b9 --- /dev/null +++ b/lang/ccl/files/patch-lisp-kernel_memory.c @@ -0,0 +1,29 @@ +--- lisp-kernel/memory.c.orig 2014-10-08 10:40:13.000000000 -0400 ++++ lisp-kernel/memory.c 2014-10-08 10:41:19.000000000 -0400 +@@ -89,7 +89,7 @@ ReserveMemoryForHeap(LogicalAddress want + start = mmap((void *)want, + totalsize + heap_segment_size, + PROT_NONE, +- MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, ++ MAP_PRIVATE | MAP_ANON, + -1, + 0); + if (start == MAP_FAILED) { +@@ -99,7 +99,7 @@ ReserveMemoryForHeap(LogicalAddress want + if (start != want) { + munmap(start, totalsize+heap_segment_size); + start = (void *)((((natural)start)+heap_segment_size-1) & ~(heap_segment_size-1)); +- if(mmap(start, totalsize, PROT_NONE, MAP_PRIVATE | MAP_ANON | MAP_FIXED | MAP_NORESERVE, -1, 0) != start) { ++ if(mmap(start, totalsize, PROT_NONE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0) != start) { + return NULL; + } + } +@@ -877,7 +877,7 @@ ReserveMemory(natural size) + PAGE_NOACCESS); + return p; + #else +- p = mmap(NULL,size,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NORESERVE,-1,0); ++ p = mmap(NULL,size,PROT_NONE,MAP_PRIVATE|MAP_ANON,-1,0); + if (p == MAP_FAILED) { + return NULL; + } -- cgit v1.2.3