]> git.saurik.com Git - apple/libc.git/blobdiff - gen/malloc.3
Libc-583.tar.gz
[apple/libc.git] / gen / malloc.3
index bbaa9aa733c764e7e1e5065decf0277b382de8ef..a75512afc2139b49cb16831a4a47aeb04cf87563 100644 (file)
@@ -18,7 +18,7 @@
 .\"
 .\" @APPLE_LICENSE_HEADER_END@
 .\"
-.Dd May 23, 2006
+.Dd Aug 13, 2008
 .Dt MALLOC 3
 .Os
 .Sh NAME
@@ -143,7 +143,9 @@ for realloc causing memory leaks in libraries.
 The
 .Fn free
 function deallocates the memory allocation pointed to by
-.Fa ptr .
+.Fa ptr .  If
+.Fa ptr 
+is a NULL pointer, no operation is performed.
 .Sh RETURN VALUES
 If successful,
 .Fn calloc ,
@@ -203,12 +205,13 @@ can be used.
 If set, record all stacks in a manner that is compatible with the
 .Nm malloc_history
 program.
-.It Ev MallocPreScribble
-If set, fill memory that has been allocated with 0xaa bytes.
-This increases the likelihood that a program making assumptions about the
-contents of freshly allocated memory will fail.
+.It Ev MallocStackLoggingDirectory
+If set, records stack logs to the directory specified instead of saving them to the default location (/tmp).
 .It Ev MallocScribble
-If set, fill memory that has been deallocated with 0x55 bytes.
+If set, fill memory that has been allocated with 0xaa bytes.
+This increases the likelihood that a program making assumptions about the contents of
+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.
 .It Ev MallocCheckHeapStart <s>
@@ -255,6 +258,13 @@ or
 , such as a calling
 .Xr free 3
 on a pointer previously freed.
+.It Ev MallocCorruptionAbort
+Similar to
+.Ev
+MallocErrorAbort 
+but will not abort in out of memory conditions, making it more useful to catch
+only those errors which will cause memory corruption.
+MallocCorruptionAbort is always set on 64-bit processes.
 .It Ev MallocHelp
 If set, print a list of environment variables that are paid heed to by the
 allocation-related functions, along with short descriptions.
@@ -265,5 +275,7 @@ The list should correspond to this documentation.
 .Xr leaks 1 ,
 .Xr malloc_history 1 ,
 .Xr abort 3 ,
-.Xr malloc_size 3
-.Pa /Developer/ADC Reference Library/releasenotes/DeveloperTools/MallocOptions.html
+.Xr malloc_size 3 ,
+.Xr malloc_zone_malloc 3 ,
+.Xr posix_memalign 3 ,
+.Xr libgmalloc 3