aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/alloc_SUITE_data
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-04-29 19:56:35 +0200
committerSverker Eriksson <[email protected]>2013-06-03 14:24:23 +0200
commitc6a4999a5e6692f35cf384b854595db6302039b9 (patch)
treef2225fddb1bec7c88f9ef092d698921191c02ee0 /erts/emulator/test/alloc_SUITE_data
parenta14c1590740bb7233400178fa069d71e280f5c8b (diff)
downloadotp-c6a4999a5e6692f35cf384b854595db6302039b9.tar.gz
otp-c6a4999a5e6692f35cf384b854595db6302039b9.tar.bz2
otp-c6a4999a5e6692f35cf384b854595db6302039b9.zip
erts: Prepare aoff allocator for carrier migration
by putting blocks from different carrier into separate search trees. Carriers are currently organized in a naive linked list by address order.
Diffstat (limited to 'erts/emulator/test/alloc_SUITE_data')
-rw-r--r--erts/emulator/test/alloc_SUITE_data/allocator_test.h2
-rw-r--r--erts/emulator/test/alloc_SUITE_data/rbtree.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/erts/emulator/test/alloc_SUITE_data/allocator_test.h b/erts/emulator/test/alloc_SUITE_data/allocator_test.h
index ec5bb9dcd6..c08398d40f 100644
--- a/erts/emulator/test/alloc_SUITE_data/allocator_test.h
+++ b/erts/emulator/test/alloc_SUITE_data/allocator_test.h
@@ -85,7 +85,7 @@ typedef void* erts_cond;
/* From erl_bestfit_alloc.c and erl_ao_firstfit_alloc.c */
#define IS_AOBF(A) ((Ulong) ALC_TEST1(RBT_OP(0), (A)))
-#define RBT_ROOT(A) ((RBT_t *) ALC_TEST1(RBT_OP(1), (A)))
+#define RBT_ROOT(A,SZ) ((RBT_t *) ALC_TEST2(RBT_OP(1), (A), (SZ)))
#define RBT_PARENT(T) ((RBT_t *) ALC_TEST1(RBT_OP(2), (T)))
#define RBT_LEFT(T) ((RBT_t *) ALC_TEST1(RBT_OP(3), (T)))
#define RBT_RIGHT(T) ((RBT_t *) ALC_TEST1(RBT_OP(4), (T)))
diff --git a/erts/emulator/test/alloc_SUITE_data/rbtree.c b/erts/emulator/test/alloc_SUITE_data/rbtree.c
index 105c9c0eb4..bdada7ca33 100644
--- a/erts/emulator/test/alloc_SUITE_data/rbtree.c
+++ b/erts/emulator/test/alloc_SUITE_data/rbtree.c
@@ -103,7 +103,7 @@ check_tree(TestCaseState_t *tcs, Allctr_t *alc, Ulong size)
else type = AOFF;
}
- root = RBT_ROOT(alc);
+ root = RBT_ROOT(alc, size);
#ifdef PRINT_TREE
print_tree(tcs, root);
@@ -369,9 +369,9 @@ test_it(TestCaseState_t *tcs)
do_check(tcs, a, 300);
}
- ASSERT(tcs, RBT_ROOT(a));
- ASSERT(tcs, !RBT_LEFT(RBT_ROOT(a)));
- ASSERT(tcs, !RBT_RIGHT(RBT_ROOT(a)));
+ ASSERT(tcs, RBT_ROOT(a,0));
+ ASSERT(tcs, !RBT_LEFT(RBT_ROOT(a,0)));
+ ASSERT(tcs, !RBT_RIGHT(RBT_ROOT(a,0)));
}