summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2019-01-10 18:47:05 +0000
committerotto <otto@openbsd.org>2019-01-10 18:47:05 +0000
commite02928f11c682f13cb9c80ef478a1405cff78ee2 (patch)
tree91bc695a084c183c6edb2b0baaed0aea8634f352
parentMake the "not my pool" searching loop a tiny bit smarter, while (diff)
downloadwireguard-openbsd-e02928f11c682f13cb9c80ef478a1405cff78ee2.tar.xz
wireguard-openbsd-e02928f11c682f13cb9c80ef478a1405cff78ee2.zip
Move default numer of pools in the multi-threaded case to 8. Various tests
by me and others indicate that it is the optimum.
-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 2a1bcfc8b69..e41178d5c56 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malloc.c,v 1.258 2019/01/10 18:45:33 otto Exp $ */
+/* $OpenBSD: malloc.c,v 1.259 2019/01/10 18:47:05 otto Exp $ */
/*
* Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net>
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
@@ -409,7 +409,7 @@ omalloc_init(void)
/*
* Default options
*/
- mopts.malloc_mutexes = 4;
+ mopts.malloc_mutexes = 8;
mopts.malloc_junk = 1;
mopts.malloc_cache = MALLOC_DEFAULT_CACHE;