From: Maria Matejka Date: Tue, 11 Jun 2024 12:46:25 +0000 (+0200) Subject: Memory allocator tweaking X-Git-Tag: v3.0.0~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea4aef2a1428e408b4f8f03de66a8725cd548303;p=thirdparty%2Fbird.git Memory allocator tweaking TODO: make this configurable --- diff --git a/sysdep/unix/alloc.c b/sysdep/unix/alloc.c index af7e66a7b..6d9bcde04 100644 --- a/sysdep/unix/alloc.c +++ b/sysdep/unix/alloc.c @@ -30,10 +30,10 @@ long page_size = 0; #ifdef HAVE_MMAP -# define KEEP_PAGES_MAX 512 +# define KEEP_PAGES_MAX 16384 # define KEEP_PAGES_MIN 32 -# define KEEP_PAGES_MAX_LOCAL 16 -# define ALLOC_PAGES_AT_ONCE 8 +# define KEEP_PAGES_MAX_LOCAL 128 +# define ALLOC_PAGES_AT_ONCE 32 STATIC_ASSERT(KEEP_PAGES_MIN * 4 < KEEP_PAGES_MAX); STATIC_ASSERT(ALLOC_PAGES_AT_ONCE < KEEP_PAGES_MAX_LOCAL);