summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.3
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2014-04-30 23:28:05 +0000
committersthen <sthen@openbsd.org>2014-04-30 23:28:05 +0000
commit56f794f64db4bb5ab19083f57f3b336a6a2f0ae8 (patch)
tree106591a6b4192e017f837495038b93be3de2c656 /lib/libc/stdlib/malloc.3
parentMake sure we flush discarded pages even if the number of hash buckets doesn't (diff)
downloadwireguard-openbsd-56f794f64db4bb5ab19083f57f3b336a6a2f0ae8.tar.xz
wireguard-openbsd-56f794f64db4bb5ab19083f57f3b336a6a2f0ae8.zip
first cut at documenting the change to malloc doing a partial 'junk' by
default and the new 'j' option to disable this; ok jmc@
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r--lib/libc/stdlib/malloc.39
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
index 854d698fcc2..5ac241c9929 100644
--- a/lib/libc/stdlib/malloc.3
+++ b/lib/libc/stdlib/malloc.3
@@ -30,9 +30,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: malloc.3,v 1.76 2014/04/22 15:02:16 jmc Exp $
+.\" $OpenBSD: malloc.3,v 1.77 2014/04/30 23:28:05 sthen Exp $
.\"
-.Dd $Mdocdate: April 22 2014 $
+.Dd $Mdocdate: April 30 2014 $
.Dt MALLOC 3
.Os
.Sh NAME
@@ -271,6 +271,11 @@ Currently junk is bytes of 0xd0 when allocating; this is pronounced
.Dq Duh .
\&:-)
Freed chunks are filled with 0xdf.
+.It Cm j
+.Dq Don't Junk .
+By default, small chunks are always junked, and the first part of pages
+is junked after free.
+This flag disables the default so that no junking is performed.
.It Cm P
.Dq Move allocations within a page.
Allocations larger than half a page but smaller than a page