aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_alloc.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-06-19 18:34:56 +0200
committerSverker Eriksson <[email protected]>2013-06-19 18:51:06 +0200
commit5d67cc7f4c176ea6ab4d2538443d5fe264152861 (patch)
tree02629c584461df3b6f80d09a1de6298af4c3440c /erts/emulator/beam/erl_alloc.c
parentf91c381afa2ebed6e37b49b4cc3f81bb9ca9e3eb (diff)
downloadotp-5d67cc7f4c176ea6ab4d2538443d5fe264152861.tar.gz
otp-5d67cc7f4c176ea6ab4d2538443d5fe264152861.tar.bz2
otp-5d67cc7f4c176ea6ab4d2538443d5fe264152861.zip
erts: Add new allocator strategy aoffcbf
with better performance than aoffcaobf as we don't have to rearrange the search tree when there are blocks of equal size.
Diffstat (limited to 'erts/emulator/beam/erl_alloc.c')
-rw-r--r--erts/emulator/beam/erl_alloc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c
index a547191d6d..7b77bcca58 100644
--- a/erts/emulator/beam/erl_alloc.c
+++ b/erts/emulator/beam/erl_alloc.c
@@ -245,7 +245,7 @@ set_default_acul(struct au_init *ip, int acul)
{
ip->thr_spec = 1;
ip->atype = AOFIRSTFIT;
- ip->init.aoff.bf_within_carrier = 1;
+ ip->init.aoff.flavor = AOFF_AOBF;
ip->init.util.acul = acul;
}
@@ -558,7 +558,7 @@ static ERTS_INLINE int
strategy_support_carrier_migration(struct au_init *auip)
{
/*
- * Currently only aoff and aoffcaobf support carrier
+ * Currently only aoff, aoffcbf and aoffcaobf support carrier
* migration, i.e, type AOFIRSTFIT.
*/
return auip->atype == AOFIRSTFIT;
@@ -583,7 +583,7 @@ ensure_carrier_migration_support(struct au_init *auip)
if (!strategy_support_carrier_migration(auip)) {
/* Default to aoffcaobf */
auip->atype = AOFIRSTFIT;
- auip->init.aoff.bf_within_carrier = 1;
+ auip->init.aoff.flavor = AOFF_AOBF;
}
}
@@ -1284,11 +1284,15 @@ handle_au_arg(struct au_init *auip,
}
else if (strcmp("aoff", alg) == 0) {
auip->atype = AOFIRSTFIT;
- auip->init.aoff.bf_within_carrier = 0;
+ auip->init.aoff.flavor = AOFF_AOFF;
+ }
+ else if (strcmp("aoffcbf", alg) == 0) {
+ auip->atype = AOFIRSTFIT;
+ auip->init.aoff.flavor = AOFF_BF;
}
else if (strcmp("aoffcaobf", alg) == 0) {
auip->atype = AOFIRSTFIT;
- auip->init.aoff.bf_within_carrier = 1;
+ auip->init.aoff.flavor = AOFF_AOBF;
}
else {
bad_value(param, sub_param + 1, alg);