diff options
author | Rickard Green <[email protected]> | 2017-02-06 20:17:28 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-02-06 20:17:28 +0100 |
commit | 12eb5089147513d1bc0797617bb6e95bc6e0c332 (patch) | |
tree | 2e9297dc7cb7b2839c9774307044d138bce46fa2 /erts/emulator/beam/erl_message.c | |
parent | 888c889714569a142525505c914f577135a46ec9 (diff) | |
parent | 8a72a253e2eda59e510d953f0b6eb21b50e06d0e (diff) | |
download | otp-12eb5089147513d1bc0797617bb6e95bc6e0c332.tar.gz otp-12eb5089147513d1bc0797617bb6e95bc6e0c332.tar.bz2 otp-12eb5089147513d1bc0797617bb6e95bc6e0c332.zip |
Merge branch 'rickard/magic-references'
OTP-14205
* rickard/magic-references:
Add binary overhead for magic ref/binaries
Adjust the only usage of exposed magic binaries
Use magic refs for maps merge trap context
Use magic refs binary_to_term/term_to_binary trap context
Use magic refs for distributed send trap context
Use magic refs for unicode static NIFs traps
Use magic refs for binary compile patterns
Use magic refs for list_to_binary/binary_to_list traps
Use magic refs for compiled match specs
Use magic refs for re:run() static NIFs trap
Use magic refs for code loading state
Use magic refs in trapping processes()/ports() BIFs
Use magic refs for NIF resources
Implement magic references
Implement erts_refc_inc_unless()
Diffstat (limited to 'erts/emulator/beam/erl_message.c')
-rw-r--r-- | erts/emulator/beam/erl_message.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_message.c b/erts/emulator/beam/erl_message.c index 5e160de080..f181c1e3cb 100644 --- a/erts/emulator/beam/erl_message.c +++ b/erts/emulator/beam/erl_message.c @@ -176,6 +176,11 @@ erts_cleanup_offheap(ErlOffHeap *offheap) erts_erase_fun_entry(u.fun->fe); } 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); + break; default: ASSERT(is_external_header(u.hdr->thing_word)); erts_deref_node_entry(u.ext->node); |