X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/5f4d86c1219d56604890d932a3152b3b5dd15b55..34e8f8296870d0e8695f90e1a54240a589d41312:/gen/malloc.3?ds=sidebyside diff --git a/gen/malloc.3 b/gen/malloc.3 index bbaa9aa..a75512a 100644 --- a/gen/malloc.3 +++ b/gen/malloc.3 @@ -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 @@ -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