summaryrefslogtreecommitdiff
path: root/sbin/unwind
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2019-12-14 19:56:26 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2019-12-14 19:56:26 +0000
commit5ef6e6f68fb253fde139b7a56883d5f41d53fbf7 (patch)
tree88e03d0fbe7609275883988d64a2762508d0b0d6 /sbin/unwind
parent6305fb6cdb25ccb3a996f742ec2eeeec7d4a1d1a (diff)
Be less aggressive pre-allocating memory; ok florian@
Diffstat (limited to 'sbin/unwind')
-rw-r--r--sbin/unwind/libunbound/util/alloc.c2
-rw-r--r--sbin/unwind/resolver.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/sbin/unwind/libunbound/util/alloc.c b/sbin/unwind/libunbound/util/alloc.c
index 7e9618931ca..e9613b10dcd 100644
--- a/sbin/unwind/libunbound/util/alloc.c
+++ b/sbin/unwind/libunbound/util/alloc.c
@@ -113,7 +113,7 @@ alloc_init(struct alloc_cache* alloc, struct alloc_cache* super,
alloc->last_id -= 1; /* for compiler portability. */
alloc->last_id |= alloc->next_id;
alloc->next_id += 1; /* because id=0 is special. */
- alloc->max_reg_blocks = 100;
+ alloc->max_reg_blocks = 10;
alloc->num_reg_blocks = 0;
alloc->reg_list = NULL;
alloc->cleanup = NULL;
diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c
index 51c07407a6a..fed32768e1b 100644
--- a/sbin/unwind/resolver.c
+++ b/sbin/unwind/resolver.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolver.c,v 1.112 2019/12/14 17:20:40 florian Exp $ */
+/* $OpenBSD: resolver.c,v 1.113 2019/12/14 19:56:24 otto Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -394,6 +394,8 @@ resolver(int debug, int verbose)
fatal(NULL);
alloc_init(&unified_cache_alloc, NULL, 0);
+ if (unified_cache_alloc.max_reg_blocks != 10)
+ fatalx("local libunbound/util/alloc.c diff lost");
/*
* context_finalize() ensures that the cache is sized according to