From 79b103c901a09638953a4e28c84d8b41a7f50b80 Mon Sep 17 00:00:00 2001 From: otto <> Date: Fri, 30 Mar 2018 07:23:15 +0000 Subject: [PATCH] fix MALLOC_STATS; spotted by and ok semarie@ --- src/lib/libc/stdlib/malloc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 90c49aa5..ff1f59c4 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.247 2018/03/06 14:28:01 deraadt Exp $ */ +/* $OpenBSD: malloc.c,v 1.248 2018/03/30 07:23:15 otto Exp $ */ /* * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek * Copyright (c) 2012 Matthew Dempsky @@ -57,7 +57,11 @@ #define MALLOC_MAXCHUNK (1 << MALLOC_MAXSHIFT) #define MALLOC_MAXCACHE 256 #define MALLOC_DELAYED_CHUNK_MASK 15 +#ifdef MALLOC_STATS +#define MALLOC_INITIAL_REGIONS 512 +#else #define MALLOC_INITIAL_REGIONS (MALLOC_PAGESIZE / sizeof(struct region_info)) +#endif #define MALLOC_DEFAULT_CACHE 64 #define MALLOC_CHUNK_LISTS 4 #define CHUNK_CHECK_LENGTH 32