diff options
author | Sverker Eriksson <[email protected]> | 2019-03-07 20:42:57 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-03-07 20:42:57 +0100 |
commit | 8dec35910330a44de3fa08573e3029f10b3aa4ae (patch) | |
tree | c40a9375b3b7623df83a7dcd34bc34959865a3d4 /erts/emulator/beam/erl_bif_info.c | |
parent | db6059a9217767a6e42e93cec05089c0ec977d20 (diff) | |
download | otp-8dec35910330a44de3fa08573e3029f10b3aa4ae.tar.gz otp-8dec35910330a44de3fa08573e3029f10b3aa4ae.tar.bz2 otp-8dec35910330a44de3fa08573e3029f10b3aa4ae.zip |
erts: Remove ets traversal yielding if heap fragment
Many heap fragments do no longer make the GC slow.
Even worse, we are not guaranteed that a yield will provoke a GC
removing the fragments, which might lead to a one-yield-per-bucket
scenario if the heap fragment(s) still remains after each yield.
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index 4050fb6146..43d99db0b2 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -4459,7 +4459,16 @@ BIF_RETTYPE erts_debug_set_internal_state_2(BIF_ALIST_2) refbin)); } } - + 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); |