From 7b736090719c6f08e286b246d9b7509413716fcf Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 20 Sep 2010 20:25:58 -0300 Subject: [PATCH] Change the min_free default to 5% Empirical tests shown that the performance is a little better with a lower memory footprint. --- rt/gc/cdgc/opts.d | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rt/gc/cdgc/opts.d b/rt/gc/cdgc/opts.d index d757bc8..7cd6784 100644 --- a/rt/gc/cdgc/opts.d +++ b/rt/gc/cdgc/opts.d @@ -58,7 +58,7 @@ struct Options bool conservative = false; bool fork = true; bool eager_alloc = true; - uint min_free = 15; // percent of the heap (0-100) + uint min_free = 5; // percent of the heap (0-100) size_t prealloc_psize = 0; size_t prealloc_npools = 0; } @@ -220,7 +220,7 @@ unittest assert (eager_alloc == true); assert (prealloc_psize == 0); assert (prealloc_npools == 0); - assert (min_free == 15); + assert (min_free == 5); } parse("mem_stomp"); with (options) { @@ -233,7 +233,7 @@ unittest assert (eager_alloc == true); assert (prealloc_psize == 0); assert (prealloc_npools == 0); - assert (min_free == 15); + assert (min_free == 5); } parse("mem_stomp=0:verbose=2:conservative:fork=0:eager_alloc=0"); with (options) { @@ -246,7 +246,7 @@ unittest assert (eager_alloc == false); assert (prealloc_psize == 0); assert (prealloc_npools == 0); - assert (min_free == 15); + assert (min_free == 5); } parse("log_file=12345 67890:verbose=1:sentinel=4:mem_stomp=1"); with (options) { @@ -259,6 +259,7 @@ unittest assert (eager_alloc == false); assert (prealloc_psize == 0); assert (prealloc_npools == 0); + assert (min_free == 5); } parse("pre_alloc:min_free=30"); with (options) { -- 2.43.0