aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-24 17:31:01 +0100
committerRickard Green <[email protected]>2017-02-06 19:54:49 +0100
commit3a34a18c2f318a4a9ea475ee80fe05bd64f05070 (patch)
tree370f273a99135402cb27f9bad6ea1508056ae030 /erts/emulator
parentcf0e60eb5b1a6a2fec388bc650235b9eded335ec (diff)
downloadotp-3a34a18c2f318a4a9ea475ee80fe05bd64f05070.tar.gz
otp-3a34a18c2f318a4a9ea475ee80fe05bd64f05070.tar.bz2
otp-3a34a18c2f318a4a9ea475ee80fe05bd64f05070.zip
Use magic refs for maps merge trap context
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/erl_map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_map.c b/erts/emulator/beam/erl_map.c
index 979a0040b0..990be8efb2 100644
--- a/erts/emulator/beam/erl_map.c
+++ b/erts/emulator/beam/erl_map.c
@@ -1197,7 +1197,7 @@ static void hashmap_merge_ctx_destructor(Binary* ctx_bin)
}
BIF_RETTYPE maps_merge_trap_1(BIF_ALIST_1) {
- Binary* ctx_bin = ((ProcBin *) binary_val(BIF_ARG_1))->val;
+ Binary* ctx_bin = erts_magic_ref2bin(BIF_ARG_1);
ASSERT(ERTS_MAGIC_BIN_DESTRUCTOR(ctx_bin) == hashmap_merge_ctx_destructor);
@@ -1453,9 +1453,9 @@ trap: /* Yield */
hashmap_merge_ctx_destructor);
ctx = ERTS_MAGIC_BIN_DATA(ctx_b);
sys_memcpy(ctx, &local_ctx, sizeof(HashmapMergeContext));
- hp = HAlloc(p, PROC_BIN_SIZE);
+ hp = HAlloc(p, ERTS_MAGIC_REF_THING_SIZE);
ASSERT(ctx->trap_bin == THE_NON_VALUE);
- ctx->trap_bin = erts_mk_magic_binary_term(&hp, &MSO(p), ctx_b);
+ ctx->trap_bin = erts_mk_magic_ref(&hp, &MSO(p), ctx_b);
erts_set_gc_state(p, 0);
}