aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_util.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-04-25 19:12:04 +0200
committerSverker Eriksson <[email protected]>2017-04-25 19:12:04 +0200
commit70074be307908d8913e042dcf564487028c53f84 (patch)
tree04ce5c9513bf13bb9760b43b5576961812ae85d0 /erts/emulator/beam/erl_db_util.c
parent504bb40f3530d5890849f1c51f7ce1aba6766784 (diff)
parent56c4aee677f305f2ed9ca877a39e9c3c4f266f4b (diff)
downloadotp-70074be307908d8913e042dcf564487028c53f84.tar.gz
otp-70074be307908d8913e042dcf564487028c53f84.tar.bz2
otp-70074be307908d8913e042dcf564487028c53f84.zip
Merge branch 'sverker/refactor'
* sverker/refactor: erts: Introduce struct binary_internals erts: Introduce erts_bin_release erts: Init refc=1 in erts_bin_drv_alloc* erts: Init refc=1 in erts_bin_nrml_alloc erts: Remove deliberate leak of hipe fun entries erts: Remove hipe_bifs:remove_refs_from/1 Refactor hipe specific code to use ErtsCodeInfo erts: Refactor ErtsCodeInfo.native
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r--erts/emulator/beam/erl_db_util.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index 03cc11bdc4..24b22eafb8 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -3265,9 +3265,7 @@ void db_cleanup_offheap_comp(DbTerm* obj)
}
switch (thing_subtag(u.hdr->thing_word)) {
case REFC_BINARY_SUBTAG:
- if (erts_refc_dectest(&u.pb->val->refc, 0) == 0) {
- erts_bin_free(u.pb->val);
- }
+ erts_bin_release(u.pb->val);
break;
case FUN_SUBTAG:
ASSERT(u.pb != &tmp);
@@ -3277,8 +3275,7 @@ void db_cleanup_offheap_comp(DbTerm* obj)
break;
case REF_SUBTAG:
ASSERT(is_magic_ref_thing(u.hdr));
- if (erts_refc_dectest(&u.mref->mb->refc, 0) == 0)
- erts_bin_free((Binary *)u.mref->mb);
+ erts_bin_release((Binary *)u.mref->mb);
break;
default:
ASSERT(is_external_header(u.hdr->thing_word));