OSDN Git Service

(split) LDP: Update original to LDP v3.41.
[linuxjm/LDP_man-pages.git] / original / man2 / madvise.2
index 36f988a..03ca249 100644 (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
@@ -227,9 +227,9 @@ The kernel will also allocate huge pages directly when the region is
 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
@@ -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 ()
@@ -308,7 +326,7 @@ mapped, or are outside the address space of the process.
 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.,
@@ -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)