]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Memory allocator tweaking
authorMaria Matejka <mq@ucw.cz>
Tue, 11 Jun 2024 12:46:25 +0000 (14:46 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 12 Jun 2024 12:48:33 +0000 (14:48 +0200)
TODO: make this configurable

sysdep/unix/alloc.c

index af7e66a7b4eef789de2cdae639aa5d994cb2fc6a..6d9bcde0457c5fd903d89a8fc6f7e7f3a283bdb3 100644 (file)
 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);