Loading...
--- libmalloc/libmalloc-116.30.3/man/malloc.3
+++ libmalloc/libmalloc-166.200.60/man/malloc.3
@@ -183,10 +183,13 @@
 The following environment variables change the behavior of the
 allocation-related functions.
 .Bl -tag -width ".Ev MallocStackLoggingNoCompact"
-.It Ev MallocLogFile <f>
-Create/append messages to the given file path
-.Fa <f>
-instead of writing to the standard error.
+.It Ev MallocDebugReport
+If set, specifies where messages are written. Set to "stderr" to write messages
+to the standard error stream, "none" to discard all messages and "crash" to
+write messages to standard error only for a condition that is about to cause a
+crash. When not set, message are written to the standard error stream if it
+appears to be a terminal (that is, if isatty(STDERR_FILENO) returns a non-zero
+value) and are otherwise discarded.
 .It Ev MallocGuardEdges
 If set, add a guard page before and after each large block.
 .It Ev MallocDoNotProtectPrelude
@@ -200,9 +203,21 @@
 .Ev MallocGuardEdges
 environment variable is set.
 .It Ev MallocStackLogging
-If set, record all stacks, so that tools like
-.Nm leaks
+The default behavior if this is set is to record all allocation and deallocation events to an on-disk log, along with stacks, so that tools like
+.Xr leaks 1
+and
+.Xr malloc_history 1
 can be used.
+.Pp
+Set to "vm" to record only allocation of virtual memory regions allocated by system calls and mach traps, such as by
+.Xr mmap 1
+.
+.Pp
+Set to "malloc" to record only allocations via
+.Xr malloc 3
+and related interfaces, not virtual memory regions.
+.Pp
+Set to "lite" to record current allocations only, not history.   These are recorded by in-memory data structures, instead of an on-disk log.
 .It Ev MallocStackLoggingNoCompact
 If set, record all stacks in a manner that is compatible with the
 .Nm malloc_history
@@ -215,7 +230,9 @@
 freshly allocated memory will fail.
 Also if set, fill memory that has been deallocated with 0x55 bytes.
 This increases the likelihood that a program will fail due to accessing memory
-that is no longer allocated.
+that is no longer allocated. Note that due to the way in which freed memory is
+managed internally, the 0x55 pattern may not appear in some parts of a
+deallocated memory block.
 .It Ev MallocCheckHeapStart <s>
 If set, specifies the number of allocations
 .Fa <s>