aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/utils.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-24 20:43:08 +0100
committerRickard Green <[email protected]>2017-02-06 19:54:49 +0100
commit8a72a253e2eda59e510d953f0b6eb21b50e06d0e (patch)
tree2e9297dc7cb7b2839c9774307044d138bce46fa2 /erts/emulator/beam/utils.c
parent28735b9c2c6390df593b05f300151addbd01e367 (diff)
downloadotp-8a72a253e2eda59e510d953f0b6eb21b50e06d0e.tar.gz
otp-8a72a253e2eda59e510d953f0b6eb21b50e06d0e.tar.bz2
otp-8a72a253e2eda59e510d953f0b6eb21b50e06d0e.zip
Add binary overhead for magic ref/binaries
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r--erts/emulator/beam/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index fc459e17ad..092a5320ba 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -3592,8 +3592,10 @@ store_external_or_ref_(Uint **hpp, ErlOffHeap* oh, Eterm ns)
return make_internal_ref(to_hp);
else {
ErtsMRefThing *mreft = (ErtsMRefThing *) from_hp;
+ ErtsMagicBinary *mb = mreft->mb;
ASSERT(is_magic_ref_thing(from_hp));
- erts_refc_inc(&mreft->mb->refc, 2);
+ erts_refc_inc(&mb->refc, 2);
+ OH_OVERHEAD(oh, mb->orig_size / sizeof(Eterm));
}
ohhp = (struct erl_off_heap_header*) to_hp;