1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00
freebsd-ports/lang/ccl/files/patch-lisp-kernel_memory.c
John Baldwin 1ebd0e3345 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)
2014-10-18 12:20:42 +00:00

30 lines
1.1 KiB
C

--- 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;
}