summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2000-02-28 04:10:35 +0000
committerps <ps@FreeBSD.org>2000-02-28 04:10:35 +0000
commitc3800346ab46195181630945b2f40e1fee7853d0 (patch)
treec1fe153aebcc58e892bd5d2eea0b026feb20e562 /lib/libc
parent1e4770cd942238b5157e2b25cd92594590c69b9d (diff)
downloadFreeBSD-src-c3800346ab46195181630945b2f40e1fee7853d0.zip
FreeBSD-src-c3800346ab46195181630945b2f40e1fee7853d0.tar.gz
Add MAP_NOCORE to mmap(2), and MADV_NOCORE and MADV_CORE to madvise(2).
This This feature allows you to specify if mmap'd data is included in an application's corefile. Change the type of eflags in struct vm_map_entry from u_char to vm_eflags_t (an unsigned int). Reviewed by: dillon,jdp,alfred Approved by: jkh
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/madvise.26
-rw-r--r--lib/libc/sys/mmap.22
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2
index 9a82782..1f8aec0 100644
--- a/lib/libc/sys/madvise.2
+++ b/lib/libc/sys/madvise.2
@@ -60,6 +60,8 @@ The known behaviors are given in
#define MADV_FREE 5 /* data is now unimportant */
#define MADV_NOSYNC 6 /* no explicit commit to physical backing store */
#define MADV_AUTOSYNC 7 /* default commit method to physical backing store */
+#define MADV_NOCORE 8 /* do not include these pages in a core file */
+#define MADV_CORE 9 /* revert to including pages in a core file */
.Ed
.Pp
.Bl -tag -width MADV_SEQUENTIAL
@@ -123,6 +125,10 @@ may or may not be reverted. You can guarentee reversion by using the
or
.Xr fsync 2
system calls.
+.It Dv MADV_NOCORE
+Region is not included in a core file.
+.It Dv MADV_CORE
+Include region in a core file.
.El
.Sh RETURN VALUES
Upon successful completion,
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
index 433f8b7..185b7b8 100644
--- a/lib/libc/sys/mmap.2
+++ b/lib/libc/sys/mmap.2
@@ -179,6 +179,8 @@ system call is obsolete since
implements a coherent filesystem buffer cache. However, it may be
used to associate dirty VM pages with filesystem buffers and thus cause
them to be flushed to physical media sooner rather then later.
+.It Dv MAP_NOCORE
+Region is not included in a core file.
.El
.Pp
The
OpenPOWER on IntegriCloud