haiku/headers/posix/sys
Michael Lotz b94221f3b2 mmap: Use MAP_NORESERVE to request overcommit, not PROT_NONE.
This reverts hrev54120 and instead adds the commonly supported
MAP_NORESERVE flag to request overcommit.

Using PROT_NONE for overcommit is problematic as the protection of
individual pages can still be changed via mprotect to make them
accessible, but that won't change the commitment. An application
using such a pattern may then unexpectedly run into out of memory
conditions on random writes into the address space.

With MAP_NORESERVE the overcommit can explicitly be requested by
applications that want to reserve address space without producing
memory pressure.

Change-Id: Id213d2245c5e23103e8e0857f7902e0cd8a2c65d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2611
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-05-09 02:57:48 +00:00
..
cdefs.h x86_64: fenv.c needs __weak_reference() 2015-03-27 20:16:57 +01:00
file.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
ioctl.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
ipc.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
mman.h mmap: Use MAP_NORESERVE to request overcommit, not PROT_NONE. 2020-05-09 02:57:48 +00:00
msg.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
param.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
poll.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
resource.h libroot: add [gs]etpriority implementation 2019-01-19 18:31:58 +00:00
select.h <langinfo.h>/<select.h>: don't use C++ comments 2013-06-12 14:55:16 +02:00
sem.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
socket.h Implement MSG_NOSIGNAL 2015-06-10 17:39:53 +02:00
sockio.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
stat.h mknod[at](): moves from unistd.h to sys/stat.h 2014-08-04 19:03:08 +02:00
statvfs.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
time.h libbsd: Move lutimes to bsd compat 2017-11-17 14:27:26 -06:00
timeb.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
times.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
types.h build fixes. 2019-08-27 20:51:51 +02:00
uio.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
un.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
utsname.h Updated copyright in headers. No functional change. 2012-07-19 18:14:06 +00:00
wait.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00