aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_init.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2009-12-10 19:59:24 +0100
committerBjörn Gustavsson <[email protected]>2010-01-13 15:35:41 +0100
commit6fd44e63eadc4d167a0db9178ff200e51c3231c1 (patch)
treeb39a6668f6f1acbf688a43d9778e566f53e49d4b /erts/emulator/beam/erl_init.c
parentbcf62deb7b8534b00ce69c977466a009252ee8a5 (diff)
downloadotp-6fd44e63eadc4d167a0db9178ff200e51c3231c1.tar.gz
otp-6fd44e63eadc4d167a0db9178ff200e51c3231c1.tar.bz2
otp-6fd44e63eadc4d167a0db9178ff200e51c3231c1.zip
Improve binary garbage collection
The garbage collector in r13b03 is too aggressive in some cases. This commit raises the level of default initial allowed binary garbage (virtual heap for binaries) before collecting from 233 words to 46368 words (181 kB on 32-bit). A new option, min_bin_vheap_size, has been added to spawn_opt, system_flag and process_flag can be used to change the default values. The option can also be used with system_info and process_info to inspect the values. For symmetry the option min_heap_size has been added to the above functions where it was previously missing. Add testcases for min_bin_vheap_size and min_heap_size for functions process_flag/2, process_info/2, system_info/2 and spawn_opt/2.
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-rw-r--r--erts/emulator/beam/erl_init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index 8afd349b85..5d2d119b14 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -84,9 +84,10 @@ int erts_use_sender_punish;
* Configurable parameters.
*/
-Uint display_items; /* no of items to display in traces etc */
+Uint display_items; /* no of items to display in traces etc */
Uint display_loads; /* print info about loaded modules */
int H_MIN_SIZE; /* The minimum heap grain */
+int BIN_VH_MIN_SIZE; /* The minimum binary virtual*/
Uint32 erts_debug_flags; /* Debug flags. */
#ifdef ERTS_OPCODE_COUNTER_SUPPORT
@@ -252,7 +253,8 @@ erl_init(void)
no_schedulers,
no_schedulers_online);
- H_MIN_SIZE = erts_next_heap_size(H_MIN_SIZE, 0);
+ H_MIN_SIZE = erts_next_heap_size(H_MIN_SIZE, 0);
+ BIN_VH_MIN_SIZE = erts_next_heap_size(BIN_VH_MIN_SIZE, 0);
erts_init_trace();
erts_init_binary();
@@ -604,6 +606,7 @@ early_init(int *argc, char **argv) /*
erts_async_max_threads = 0;
erts_async_thread_suggested_stack_size = ERTS_ASYNC_THREAD_MIN_STACK_SIZE;
H_MIN_SIZE = H_DEFAULT_SIZE;
+ BIN_VH_MIN_SIZE = VH_DEFAULT_SIZE;
erts_initialized = 0;