aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db.c
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-03-17 12:19:57 +0100
committerMicael Karlberg <[email protected]>2011-03-17 12:19:57 +0100
commit6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce (patch)
tree82e54daec07390bb4cad8b279e0e8d1fd0170b78 /erts/emulator/beam/erl_db.c
parent4f42486c2f94860c1aa8152562760b6a2aa7c5cb (diff)
parentf861b4fdb3fd39e35f2951c53a73b30a98c7f973 (diff)
downloadotp-6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce.tar.gz
otp-6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce.tar.bz2
otp-6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce.zip
Merge branch 'dev' into bmk/inets/ftp/missing_spec_causes_dialyxer_problems/OTP-9114
Also fixed a bunch of "end-years" (was 2010 but should have been 2011, which the commit hook not happy with).
Diffstat (limited to 'erts/emulator/beam/erl_db.c')
-rw-r--r--erts/emulator/beam/erl_db.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c
index 5b74240cc3..61e8a595be 100644
--- a/erts/emulator/beam/erl_db.c
+++ b/erts/emulator/beam/erl_db.c
@@ -2773,17 +2773,10 @@ void init_db(void)
rwmtx_opt.type = ERTS_SMP_RWMTX_TYPE_FREQUENT_READ;
rwmtx_opt.lived = ERTS_SMP_RWMTX_LONG_LIVED;
- meta_main_tab_locks = erts_alloc(ERTS_ALC_T_DB_TABLES,
- (sizeof(erts_meta_main_tab_lock_t)
- * (ERTS_META_MAIN_TAB_LOCK_TAB_SIZE+1)));
-
- if ((((UWord) meta_main_tab_locks) & ERTS_CACHE_LINE_MASK) != 0)
- meta_main_tab_locks = ((erts_meta_main_tab_lock_t *)
- ((((UWord) meta_main_tab_locks)
- & ~ERTS_CACHE_LINE_MASK)
- + ERTS_CACHE_LINE_SIZE));
-
- ASSERT((((UWord) meta_main_tab_locks) & ERTS_CACHE_LINE_MASK) == 0);
+ meta_main_tab_locks =
+ erts_alloc_permanent_cache_aligned(ERTS_ALC_T_DB_TABLES,
+ sizeof(erts_meta_main_tab_lock_t)
+ * ERTS_META_MAIN_TAB_LOCK_TAB_SIZE);
for (i = 0; i < ERTS_META_MAIN_TAB_LOCK_TAB_SIZE; i++) {
erts_smp_rwmtx_init_opt_x(&meta_main_tab_locks[i].rwmtx, &rwmtx_opt,