summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/malloc.3
diff options
context:
space:
mode:
authorotto <>2008-11-02 08:50:41 +0000
committerotto <>2008-11-02 08:50:41 +0000
commit78d2870f638221e075bcb0fbaf1e9f0a2b98c6b0 (patch)
treed1043649909fd062af2afee5d68256a1d35fcfb6 /src/lib/libc/stdlib/malloc.3
parent36c5e8ecef339cd13f51e8181ff18063de971ac3 (diff)
downloadopenbsd-78d2870f638221e075bcb0fbaf1e9f0a2b98c6b0.tar.gz
openbsd-78d2870f638221e075bcb0fbaf1e9f0a2b98c6b0.tar.bz2
openbsd-78d2870f638221e075bcb0fbaf1e9f0a2b98c6b0.zip
remove distinction between warnings and errors, ok deraadt@ djm@
Diffstat (limited to 'src/lib/libc/stdlib/malloc.3')
-rw-r--r--src/lib/libc/stdlib/malloc.344
1 files changed, 18 insertions, 26 deletions
diff --git a/src/lib/libc/stdlib/malloc.3 b/src/lib/libc/stdlib/malloc.3
index b9d62d04d0..8da3a299e1 100644
--- a/src/lib/libc/stdlib/malloc.3
+++ b/src/lib/libc/stdlib/malloc.3
@@ -30,9 +30,9 @@
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE. 31.\" SUCH DAMAGE.
32.\" 32.\"
33.\" $OpenBSD: malloc.3,v 1.54 2008/08/07 18:41:47 otto Exp $ 33.\" $OpenBSD: malloc.3,v 1.55 2008/11/02 08:50:41 otto Exp $
34.\" 34.\"
35.Dd $Mdocdate: August 7 2008 $ 35.Dd $Mdocdate: November 2 2008 $
36.Dt MALLOC 3 36.Dt MALLOC 3
37.Os 37.Os
38.Sh NAME 38.Sh NAME
@@ -215,9 +215,11 @@ Flags are single letters, uppercase means on, lowercase means off.
215.It Cm A 215.It Cm A
216.Dq Abort . 216.Dq Abort .
217.Fn malloc 217.Fn malloc
218will coredump the process, rather than tolerate failure. 218will coredump the process, rather than tolerate internal
219This is a very handy debugging aid, since the core file will represent the 219inconsistencies or incorrect usage.
220time of failure, rather than when the null pointer was accessed. 220This is the default and a very handy debugging aid,
221since the core file represents the time of failure,
222rather than when the bogus pointer was used.
221.It Cm D 223.It Cm D
222.Dq Dump . 224.Dq Dump .
223.Fn malloc 225.Fn malloc
@@ -248,9 +250,6 @@ Currently junk is bytes of 0xd0 when allocating; this is pronounced
248.Dq Duh . 250.Dq Duh .
249\&:-) 251\&:-)
250Freed chunks are filled with 0xdf. 252Freed chunks are filled with 0xdf.
251.It Cm N
252Do not output warning messages when encountering possible corruption
253or bad pointers.
254.It Cm P 253.It Cm P
255.Dq Move allocations within a page. 254.Dq Move allocations within a page.
256Allocations larger than half a page but smaller that a page 255Allocations larger than half a page but smaller that a page
@@ -297,7 +296,7 @@ Increase the size of the free page cache by a factor of two.
297.El 296.El
298.Pp 297.Pp
299So to set a systemwide reduction of cache size and coredumps on problems: 298So to set a systemwide reduction of cache size and coredumps on problems:
300.Li ln -s 'A<' /etc/malloc.conf 299.Li ln -s 'G<' /etc/malloc.conf
301.Pp 300.Pp
302The 301The
303.Cm J 302.Cm J
@@ -349,22 +348,19 @@ If
349.Fn realloc , 348.Fn realloc ,
350or 349or
351.Fn free 350.Fn free
352detect an error or warning condition, 351detect an error condition,
353a message will be printed to file descriptor 352a message will be printed to file descriptor
3542 (not using stdio). 3532 (not using stdio).
355Errors will always result in the process being 354Errors will result in the process being aborted,
356.Xr abort 3 'ed. 355unless the
357If the 356.Cm a
358.Cm A 357option has been specified.
359option has been specified, warnings will also
360.Xr abort 3
361the process.
362.Pp 358.Pp
363Here is a brief description of the error messages and what they mean: 359Here is a brief description of the error messages and what they mean:
364.Bl -tag -width Ds 360.Bl -tag -width Ds
365.It Dq out of memory 361.It Dq out of memory
366If the 362If the
367.Cm A 363.Cm X
368option is specified it is an error for 364option is specified it is an error for
369.Fn malloc , 365.Fn malloc ,
370.Fn calloc , 366.Fn calloc ,
@@ -375,14 +371,6 @@ to return
375.It Dq malloc init mmap failed 371.It Dq malloc init mmap failed
376This is a rather weird condition that is most likely to indicate a 372This is a rather weird condition that is most likely to indicate a
377seriously overloaded system or a ulimit restriction. 373seriously overloaded system or a ulimit restriction.
378.It any other error
379.Fn malloc
380detected an internal error;
381consult sources and/or wizards.
382.El
383.Pp
384Here is a brief description of the warning messages and what they mean:
385.Bl -tag -width Ds
386.It Dq bogus pointer (double free?) 374.It Dq bogus pointer (double free?)
387An attempt to 375An attempt to
388.Fn free 376.Fn free
@@ -418,6 +406,10 @@ The internal malloc page cache has been corrupted.
418The internal malloc page cache has been corrupted. 406The internal malloc page cache has been corrupted.
419.It Dq guard size 407.It Dq guard size
420An inconsistent guard size was detected. 408An inconsistent guard size was detected.
409.It any other error
410.Fn malloc
411detected an internal error;
412consult sources and/or wizards.
421.El 413.El
422.Sh SEE ALSO 414.Sh SEE ALSO
423.Xr brk 2 , 415.Xr brk 2 ,