.\" 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
naturally aligned to the huge page size (see
.BR posix_memalign (2)).
This feature is primarily aimed at applications that use large mappings of
-data and access large regions of that memory at a time (e.g. virtualization
+data and access large regions of that memory at a time (e.g., virtualization
systems such as QEMU).
-It can very easily waste memory (e.g. a 2MB mapping that only ever accesses
+It can very easily waste memory (e.g., a 2MB mapping that only ever accesses
1 byte will result in 2MB of wired memory instead of one 4KB page).
See the kernel source file
.I Documentation/vm/transhuge.txt
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 ()
POSIX.1b.
POSIX.1-2001 describes
.BR posix_madvise (3)
-.\" FIXME . Write a posix_fadvise(3) page.
+.\" FIXME . Write a posix_madvise(3) page.
with constants
.BR POSIX_MADV_NORMAL ,
etc.,
.BR mmap (2),
.BR mprotect (2),
.BR msync (2),
-.BR munmap (2)
+.BR munmap (2),
+.BR core (5)