aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bestfit_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_bestfit_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_bestfit_alloc.c')
-rw-r--r--erts/emulator/beam/erl_bestfit_alloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bestfit_alloc.c b/erts/emulator/beam/erl_bestfit_alloc.c
index 58e53c3d00..41f449bb28 100644
--- a/erts/emulator/beam/erl_bestfit_alloc.c
+++ b/erts/emulator/beam/erl_bestfit_alloc.c
@@ -966,15 +966,17 @@ UWord
erts_bfalc_test(UWord op, UWord a1, UWord a2)
{
switch (op) {
- case 0x200: return (UWord) ((BFAllctr_t *) a1)->address_order;
+ case 0x200: return (UWord) ((BFAllctr_t *) a1)->address_order; /* IS_AOBF */
case 0x201: return (UWord) ((BFAllctr_t *) a1)->mbc_root;
case 0x202: return (UWord) ((RBTree_t *) a1)->parent;
case 0x203: return (UWord) ((RBTree_t *) a1)->left;
case 0x204: return (UWord) ((RBTree_t *) a1)->right;
- case 0x205: return (UWord) ((RBTreeList_t *) a1)->next;
+ case 0x205: return (UWord) LIST_NEXT(a1);
case 0x206: return (UWord) IS_BLACK((RBTree_t *) a1);
case 0x207: return (UWord) IS_TREE_NODE((RBTree_t *) a1);
case 0x208: return (UWord) 1; /* IS_BF_ALGO */
+ case 0x20a: return (UWord) !((BFAllctr_t *) a1)->address_order; /* IS_BF */
+ case 0x20b: return (UWord) LIST_PREV(a1);
default: ASSERT(0); return ~((UWord) 0);
}
}