aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-05-04 17:07:41 +0200
committerLukas Larsson <[email protected]>2017-10-02 10:17:00 +0200
commit300925cc0de95650cf5b13e938ccf702a8eadc9e (patch)
tree05714f34664ef6541ef9f5f5e478a0471460fbee
parent6e2023777af660ef32d48d0a57d9157745975847 (diff)
downloadotp-300925cc0de95650cf5b13e938ccf702a8eadc9e.tar.gz
otp-300925cc0de95650cf5b13e938ccf702a8eadc9e.tar.bz2
otp-300925cc0de95650cf5b13e938ccf702a8eadc9e.zip
erts: temp_alloc can no longer be disabled
temp_alloc is used in such a way that if it ever results in a malloc/free sequence it will slow down the system alot. So it will no longer be possible to disable it and it will not be disabled when using +Mea min. OTP-14651
-rw-r--r--erts/doc/src/erts_alloc.xml6
-rw-r--r--erts/emulator/beam/erl_alloc.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml
index d3f725ef99..580780e73b 100644
--- a/erts/doc/src/erts_alloc.xml
+++ b/erts/doc/src/erts_alloc.xml
@@ -87,9 +87,9 @@
the number of system calls made.</item>
</taglist>
- <p><c>sys_alloc</c> and <c>literal_alloc</c> are always enabled and
- cannot be disabled. <c>exec_alloc</c> is only available if it is needed
- and cannot be disabled. <c>mseg_alloc</c> is always enabled if it is
+ <p><c>sys_alloc</c>, <c>literal_alloc</c> and <c>temp_alloc</c> are always
+ enabled and cannot be disabled. <c>exec_alloc</c> is only available if it
+ is needed and cannot be disabled. <c>mseg_alloc</c> is always enabled if it is
available and an allocator that uses it is enabled. All other
allocators can be <seealso marker="#M_e">enabled or disabled</seealso>.
By default all allocators are enabled.
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c
index 1c365f906b..88285d8be6 100644
--- a/erts/emulator/beam/erl_alloc.c
+++ b/erts/emulator/beam/erl_alloc.c
@@ -385,6 +385,7 @@ set_default_temp_alloc_opts(struct au_init *ip)
SET_DEFAULT_ALLOC_OPTS(ip);
ip->enable = AU_ALLOC_DEFAULT_ENABLE(1);
ip->thr_spec = 1;
+ ip->disable_allowed = 0;
ip->carrier_migration_allowed = 0;
ip->atype = AFIT;
ip->init.util.name_prefix = "temp_";
@@ -1492,8 +1493,7 @@ handle_args(int *argc, char **argv, erts_alc_hndl_args_init_t *init)
&init->ll_alloc,
&init->driver_alloc,
&init->fix_alloc,
- &init->sl_alloc,
- &init->temp_alloc
+ &init->sl_alloc
/* test_alloc not affected by +Mea??? or +Mu??? */
};
int aui_sz = (int) sizeof(aui)/sizeof(aui[0]);