madvise.2: Document MADV_DONTDUMP and MADV_DODUMP

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Jason Baron 2012-04-28 19:28:44 +12:00 committed by Michael Kerrisk
parent 85ab5d7ad6
commit c639b31479
1 changed files with 21 additions and 2 deletions

View File

@ -32,7 +32,7 @@
.\" 2011-09-18, Doug Goldstein <cardoe@cardoe.com>
.\" Document MADV_HUGEPAGE and MADV_NOHUGEPAGE
.\"
.TH MADVISE 2 2011-09-18 "Linux" "Linux Programmer's Manual"
.TH MADVISE 2 2012-04-28 "Linux" "Linux Programmer's Manual"
.SH NAME
madvise \- give advice about use of memory
.SH SYNOPSIS
@ -247,6 +247,24 @@ Ensures that memory in the address range specified by
and
.IR length
will not be collapsed into huge pages.
.TP
.BR MADV_DONTDUMP " (since Linux 3.4)"
Exclude from a core dump those pages in the range specified by
.I addr
and
.IR length .
This is useful in applications that have large areas of memory
that are known not to be useful in a core dump.
The effect of
.BR MADV_DONTDUMP
takes precedence over the bit mask that is set via the
.I /proc/PID/coredump_filter
file (see
.BR core (5)).
.TP
.BR MADV_DODUMP " (since Linux 3.4)"
Undo the effect of an earlier
.BR MADV_DONTDUMP .
.SH "RETURN VALUE"
On success
.BR madvise ()
@ -356,4 +374,5 @@ from the system call, as it should).
.BR mmap (2),
.BR mprotect (2),
.BR msync (2),
.BR munmap (2)
.BR munmap (2),
.BR core (5)