summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2008-11-20 09:05:15 +0000
committerotto <otto@openbsd.org>2008-11-20 09:05:15 +0000
commite594c53f18bd459d0090676b2b3119d5a085653b (patch)
tree1b4693f99b2ca66045757ba8c8b7340b3b3601f1 /lib/libc/stdlib/malloc.c
parentReduce the leeway malloc allows when moving allocations to the end of (diff)
downloadwireguard-openbsd-e594c53f18bd459d0090676b2b3119d5a085653b.tar.xz
wireguard-openbsd-e594c53f18bd459d0090676b2b3119d5a085653b.zip
move allocations between half a page and a page as close to the end of
the page as possible (i.e. make malloc option P a default). ok art@ millert@ krw@
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-rw-r--r--lib/libc/stdlib/malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index 4e33d33b1b7..0f1f088b442 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malloc.c,v 1.109 2008/11/20 09:01:24 otto Exp $ */
+/* $OpenBSD: malloc.c,v 1.110 2008/11/20 09:05:15 otto Exp $ */
/*
* Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
*
@@ -154,7 +154,7 @@ static int malloc_active; /* status of malloc */
static int malloc_freeprot; /* mprotect free pages PROT_NONE? */
static int malloc_hint; /* call madvice on free pages? */
static int malloc_junk; /* junk fill? */
-static int malloc_move; /* move allocations to end of page? */
+static int malloc_move = 1; /* move allocations to end of page? */
static int malloc_realloc; /* always realloc? */
static int malloc_xmalloc; /* xmalloc behaviour? */
static int malloc_zero; /* zero fill? */