aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_alloc_util.h
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/beam/erl_alloc_util.h
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/beam/erl_alloc_util.h')
-rw-r--r--erts/emulator/beam/erl_alloc_util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_alloc_util.h b/erts/emulator/beam/erl_alloc_util.h
index af8f72ed7d..1183bf901d 100644
--- a/erts/emulator/beam/erl_alloc_util.h
+++ b/erts/emulator/beam/erl_alloc_util.h
@@ -306,10 +306,13 @@ typedef struct {
(ASSERT(IS_MBC_BLK(B) && !IS_FREE_BLK(B)), \
(Carrier_t*)((MSEG_UNIT_FLOOR((UWord)(B)) - \
(((B)->bhdr >> MBC_ABLK_OFFSET_SHIFT) << MSEG_UNIT_SHIFT))))
+# define BLK_TO_MBC(B) (IS_FREE_BLK(B) ? FBLK_TO_MBC(B) : ABLK_TO_MBC(B))
#else
# define FBLK_TO_MBC(B) ((B)->carrier)
# define ABLK_TO_MBC(B) ((B)->carrier)
+# define BLK_TO_MBC(B) ((B)->carrier)
#endif
+#define MBC_BLK_SZ(B) (IS_FREE_BLK(B) ? MBC_FBLK_SZ(B) : MBC_ABLK_SZ(B))
typedef UWord FreeBlkFtr_t; /* Footer of a free block */