aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_info.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-03-08 11:46:12 +0100
committerSverker Eriksson <[email protected]>2019-03-08 11:46:12 +0100
commit7def10d22332fa0e0dd009ff4405b92a184ea3a5 (patch)
treee437ecb61d792a0eb06adbcd7a55cfaf1f0b3e4f /erts/emulator/beam/erl_bif_info.c
parent92962f3bb0d3bd8e0aab40fa142fc8083977caef (diff)
parent8e323b5c6cbc2ffc8f8f8883daaaf419144c35f1 (diff)
downloadotp-7def10d22332fa0e0dd009ff4405b92a184ea3a5.tar.gz
otp-7def10d22332fa0e0dd009ff4405b92a184ea3a5.tar.bz2
otp-7def10d22332fa0e0dd009ff4405b92a184ea3a5.zip
Merge branch 'sverker/maint/ets-no-mbuf-trapping/OTP-15660' into maint
* sverker/maint/ets-no-mbuf-trapping/OTP-15660: erts: Remove ets traversal yielding if heap fragment
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r--erts/emulator/beam/erl_bif_info.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index f6a98c85fd..16c06766fb 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -4674,6 +4674,16 @@ BIF_RETTYPE erts_debug_set_internal_state_2(BIF_ALIST_2)
BIF_RET(am_notsup);
#endif
}
+ else if (ERTS_IS_ATOM_STR("mbuf", BIF_ARG_1)) {
+ Uint sz = size_object(BIF_ARG_2);
+ ErlHeapFragment* frag = new_message_buffer(sz);
+ Eterm *hp = frag->mem;
+ Eterm copy = copy_struct(BIF_ARG_2, sz, &hp, &frag->off_heap);
+ frag->next = BIF_P->mbuf;
+ BIF_P->mbuf = frag;
+ BIF_P->mbuf_sz += sz;
+ BIF_RET(copy);
+ }
}
BIF_ERROR(BIF_P, BADARG);