diff options
author | Sverker Eriksson <[email protected]> | 2018-01-26 18:42:32 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-02-12 13:23:15 +0100 |
commit | defd43985282606e841e2bcb29ad7414080d5a80 (patch) | |
tree | a84272181bf03e943c51efa9791ecdf39ea9b5b7 /erts/emulator/beam/erl_alloc.c | |
parent | 3d8612cd57efd1e96601c5ef9cc986676b76fbf3 (diff) | |
download | otp-defd43985282606e841e2bcb29ad7414080d5a80.tar.gz otp-defd43985282606e841e2bcb29ad7414080d5a80.tar.bz2 otp-defd43985282606e841e2bcb29ad7414080d5a80.zip |
erts: Add age order first fit allocator strategies
ageffcaoff: Age First Fit Carrier, Address Order First Fit (within carrier)
ageffcbf : Age First Fit Carrier, Best Fit (within carrier)
ageffcaobf: Age First Fit Carrier, Address Order Best Fit (within carrier)
Prefer old carriers, the older the better.
Diffstat (limited to 'erts/emulator/beam/erl_alloc.c')
-rw-r--r-- | erts/emulator/beam/erl_alloc.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c index 4c9fb466eb..67cd3afb25 100644 --- a/erts/emulator/beam/erl_alloc.c +++ b/erts/emulator/beam/erl_alloc.c @@ -604,7 +604,7 @@ static ERTS_INLINE int strategy_support_carrier_migration(struct au_init *auip) { /* - * Currently only aoff, aoffcbf and aoffcaobf support carrier + * Currently only aoff* and ageff* support carrier * migration, i.e, type AOFIRSTFIT. */ return auip->atype == FIRSTFIT; @@ -1432,6 +1432,21 @@ handle_au_arg(struct au_init *auip, auip->init.aoff.crr_order = FF_AOFF; auip->init.aoff.blk_order = FF_AOBF; } + else if (strcmp("ageffcaoff", alg) == 0) { + auip->atype = FIRSTFIT; + auip->init.aoff.crr_order = FF_AGEFF; + auip->init.aoff.blk_order = FF_AOFF; + } + else if (strcmp("ageffcbf", alg) == 0) { + auip->atype = FIRSTFIT; + auip->init.aoff.crr_order = FF_AGEFF; + auip->init.aoff.blk_order = FF_BF; + } + else if (strcmp("ageffcaobf", alg) == 0) { + auip->atype = FIRSTFIT; + auip->init.aoff.crr_order = FF_AGEFF; + auip->init.aoff.blk_order = FF_AOBF; + } else { bad_value(param, sub_param + 1, alg); } |