summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2018-03-05 01:32:32 +0000
committerderaadt <deraadt@openbsd.org>2018-03-05 01:32:32 +0000
commit159466167b0e07061f4371b15ca89e3ed1771763 (patch)
tree64cd46682201eef6b2b0c87bc1d14b4b3b24f4e8 /lib/libc/stdlib/malloc.c
parent#define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an arch (diff)
downloadwireguard-openbsd-159466167b0e07061f4371b15ca89e3ed1771763.tar.xz
wireguard-openbsd-159466167b0e07061f4371b15ca89e3ed1771763.zip
Use _MAX_PAGE_SHIFT, rather than #ifdef mips64
ok guenther kettenis
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-rw-r--r--lib/libc/stdlib/malloc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index 346fa55267f..9843cab838e 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malloc.c,v 1.245 2018/02/07 18:58:30 otto Exp $ */
+/* $OpenBSD: malloc.c,v 1.246 2018/03/05 01:32:32 deraadt Exp $ */
/*
* Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net>
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
@@ -46,11 +46,7 @@
#include "thread_private.h"
#include <tib.h>
-#if defined(__mips64__)
-#define MALLOC_PAGESHIFT (14U)
-#else
-#define MALLOC_PAGESHIFT (PAGE_SHIFT)
-#endif
+#define MALLOC_PAGESHIFT _MAX_PAGE_SHIFT
#define MALLOC_MINSHIFT 4
#define MALLOC_MAXSHIFT (MALLOC_PAGESHIFT - 1)