From c3800346ab46195181630945b2f40e1fee7853d0 Mon Sep 17 00:00:00 2001 From: ps Date: Mon, 28 Feb 2000 04:10:35 +0000 Subject: 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 --- lib/libc/sys/madvise.2 | 6 ++++++ lib/libc/sys/mmap.2 | 2 ++ 2 files changed, 8 insertions(+) (limited to 'lib/libc') 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 -- cgit v1.1