summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2018-11-21 09:26:03 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2018-11-21 09:26:03 +0000
commitac7ea64551d12f369489252264d5804ae2bd1f9b (patch)
treec36b841e5084fe897b4d493f45aa12c61295a1b3
parent97ea715bbb873ae614b0abfc658bfc31e9a317c6 (diff)
no more malloc.conf - it's contents are now in malloc(3) itself,
and sysctl(2); ok otto deraadt
-rw-r--r--share/man/man5/Makefile4
-rw-r--r--share/man/man5/malloc.conf.5149
2 files changed, 2 insertions, 151 deletions
diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile
index 96f49b04516..abc05b618a5 100644
--- a/share/man/man5/Makefile
+++ b/share/man/man5/Makefile
@@ -1,11 +1,11 @@
-# $OpenBSD: Makefile,v 1.56 2018/04/28 16:43:44 schwarze Exp $
+# $OpenBSD: Makefile,v 1.57 2018/11/21 09:26:02 jmc Exp $
# $NetBSD: Makefile,v 1.14 1995/05/11 23:13:15 cgd Exp $
MAN= acct.5 ar.5 bsd.port.mk.5 bsd.port.arch.mk.5 bsd.regress.mk.5 \
changelist.5 core.5 \
defaultdomain.5 dir.5 disktab.5 elf.5 ethers.5 fbtab.5 files.conf.5 \
fs.5 fstab.5 genassym.cf.5 group.5 hostname.if.5 hosts.5 installurl.5 \
- intro.5 login.conf.5 malloc.conf.5 mandoc.db.5 mixerctl.conf.5 \
+ intro.5 login.conf.5 mandoc.db.5 mixerctl.conf.5 \
mk.conf.5 moduli.5 motd.5 myname.5 netgroup.5 passwd.5 \
pf.conf.5 pf.os.5 port-modules.5 printcap.5 protocols.5 \
ranlib.5 remote.5 resolv.conf.5 rpc.5 ruby-module.5 \
diff --git a/share/man/man5/malloc.conf.5 b/share/man/man5/malloc.conf.5
deleted file mode 100644
index 404aeb7c22c..00000000000
--- a/share/man/man5/malloc.conf.5
+++ /dev/null
@@ -1,149 +0,0 @@
-.\" $OpenBSD: malloc.conf.5,v 1.19 2018/11/13 14:34:47 jmc Exp $
-.\"
-.\" Copyright (c) 2012 Damien Miller <djm@openbsd.org>
-.\" Copyright (c) 2008, 2009, 2010, 2011 Otto Moerbeek <otto@drijf.net>
-.\" Copyright (c) 2003, 2004, 2005 Ted Unangst <tedu@openbsd.org>
-.\" Copyright (c) 1995, 1996 Poul-Henning Kamp <phk@freebsd.org>
-.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd $Mdocdate: November 13 2018 $
-.Dt MALLOC.CONF 5
-.Os
-.Sh NAME
-.Nm malloc.conf
-.Nd options for the memory allocator
-.Sh DESCRIPTION
-Upon the first call to the
-.Xr malloc 3
-family of functions, an initialization sequence inspects the
-value of the
-.Va vm.malloc_conf
-.Xr sysctl 2 ,
-next checks the environment for a variable called
-.Ev MALLOC_OPTIONS ,
-and finally looks at the global variable
-.Va malloc_options
-in the program.
-Each is scanned for the flags documented below.
-Unless otherwise noted uppercase means on, lowercase means off.
-.Bl -tag -width indent
-.It Cm C
-.Dq Canaries .
-Add canaries at the end of allocations in order to detect
-heap overflows.
-The canary's content is checked when
-.Xr free 3
-is called.
-If it has been corrupted, the process is aborted.
-.It Cm D
-.Dq Dump .
-.Xr malloc 3
-will dump statistics to the file
-.Pa ./malloc.out ,
-if it already exists,
-at exit.
-This option requires the library to have been compiled with -DMALLOC_STATS in
-order to have any effect.
-.It Cm F
-.Dq Freecheck .
-Enable more extensive double free and use after free detection.
-All chunks in the delayed free list will be checked for double frees.
-Unused pages on the freelist are read and write protected to
-cause a segmentation fault upon access.
-.It Cm G
-.Dq Guard .
-Enable guard pages.
-Each page size or larger allocation is followed by a guard page that will
-cause a segmentation fault upon any access.
-.It Cm J
-.Dq More junking .
-Increase the junk level by one if it is smaller than 2.
-.It Cm j
-.Dq Less junking .
-Decrease the junk level by one if it is larger than 0.
-Junking writes some junk bytes into the area allocated.
-Junk is bytes of 0xdb when allocating;
-freed chunks are filled with 0xdf.
-By default the junk level is 1: after free,
-small chunks are completely junked;
-for pages the first part is junked.
-After a delay,
-the filling pattern is validated and the process is aborted if the pattern
-was modified.
-For junk level 2, junking is done on allocation as well and without size
-restrictions.
-If the junk level is zero, no junking is performed.
-.It Cm R
-.Dq realloc .
-Always reallocate when
-.Xr realloc 3
-is called, even if the initial allocation was big enough.
-.\".Pp
-.\".It Cm U
-.\".Dq utrace .
-.\"Generate entries for
-.\".Xr ktrace 1
-.\"for all operations.
-.\"Consult the source for this one.
-.It Cm S
-Enable all options suitable for security auditing.
-.It Cm U
-.Dq Free unmap .
-Enable use after free protection for larger allocations.
-Unused pages on the freelist are read and write protected to
-cause a segmentation fault upon access.
-.It Cm X
-.Dq xmalloc .
-Rather than return failure,
-.Xr abort 3
-the program with a diagnostic message on stderr.
-It is the intention that this option be set at compile time by
-including in the source:
-.Bd -literal -offset indent
-extern char *malloc_options;
-malloc_options = "X";
-.Ed
-.Pp
-Note that this will cause code that is supposed to handle
-out-of-memory conditions gracefully to abort instead.
-.It Cm <
-.Dq Halve the cache size .
-Decrease the size of the free page cache by a factor of two.
-.It Cm >
-.Dq Double the cache size .
-Increase the size of the free page cache by a factor of two.
-.El
-.Pp
-If a program changes behavior if any of these options (except
-.Cm X )
-are used,
-it is buggy.
-.Pp
-The default number of free pages cached is 64 per malloc pool.
-Multi-threaded programs use multiple pools.
-The
-.Va vm.malloc_conf
-sysctl value string contains a maximum of 15 option characters.
-.Sh ENVIRONMENT
-.Bl -tag -width "MALLOC_OPTIONS"
-.It Ev MALLOC_OPTIONS
-string of option flags
-.El
-.Sh EXAMPLES
-Set a systemwide reduction of the cache to a quarter of the
-default size and use guard pages:
-.Pp
-.Dl # sysctl vm.malloc_conf='G<<'
-.Sh SEE ALSO
-.Xr malloc 3