aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/erl_nif.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index c6127a4967..e1944fff29 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -627,7 +627,9 @@ int enif_send(ErlNifEnv* env, const ErlNifPid* to_pid,
MBUF(&menv->phony_proc) = NULL;
}
} else {
- Uint sz = size_object(msg);
+ Eterm *lit_purge_ptr = erts_clrange.ptr;
+ Uint lit_purge_sz = erts_clrange.sz;
+ Uint sz = size_object_litopt(msg, lit_purge_ptr, lit_purge_sz);
ErlOffHeap *ohp;
Eterm *hp;
if (env && !env->tracee) {
@@ -649,7 +651,8 @@ int enif_send(ErlNifEnv* env, const ErlNifPid* to_pid,
ohp = &bp->off_heap;
}
}
- msg = copy_struct(msg, sz, &hp, ohp);
+ msg = copy_struct_litopt(msg, sz, &hp, ohp,
+ lit_purge_ptr, lit_purge_sz);
}
ERL_MESSAGE_TERM(mp) = msg;