aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_hash.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-09-27 16:07:10 +0200
committerSverker Eriksson <[email protected]>2018-10-03 19:00:53 +0200
commitd88239752cdeacfac8858439334599b3ec471803 (patch)
tree8ffd956327a28e68e0f41afd6ab75ad4d2a55135 /erts/emulator/beam/erl_db_hash.c
parent4a67d1a104193ca0f5a0dc3f3dfc0e2b6df61f2f (diff)
downloadotp-d88239752cdeacfac8858439334599b3ec471803.tar.gz
otp-d88239752cdeacfac8858439334599b3ec471803.tar.bz2
otp-d88239752cdeacfac8858439334599b3ec471803.zip
erts: Improve deallocation of CATree nodes
Update table memory stats before scheduling free to not be dependent on deallocation order with main table struct.
Diffstat (limited to 'erts/emulator/beam/erl_db_hash.c')
-rw-r--r--erts/emulator/beam/erl_db_hash.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c
index 752d3ae3a8..61806876a7 100644
--- a/erts/emulator/beam/erl_db_hash.c
+++ b/erts/emulator/beam/erl_db_hash.c
@@ -2731,13 +2731,9 @@ static int free_seg(DbTableHash *tb, int free_records)
* sure no lingering threads are still hanging in BUCKET macro
* with an old segtab pointer.
*/
- Uint sz = SIZEOF_EXT_SEGTAB(est->nsegs);
- ASSERT(sz == ERTS_ALC_DBG_BLK_SZ(est));
- ERTS_DB_ALC_MEM_UPDATE_(tb, sz, 0);
- erts_schedule_thr_prgr_later_cleanup_op(dealloc_ext_segtab,
- est,
- &est->lop,
- sz);
+ erts_schedule_db_free(&tb->common, dealloc_ext_segtab,
+ est, &est->lop,
+ SIZEOF_EXT_SEGTAB(est->nsegs));
}
else
erts_db_free(ERTS_ALC_T_DB_SEG, (DbTable*)tb, est,