diff options
author | Sverker Eriksson <[email protected]> | 2015-12-08 15:02:43 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-12-08 15:02:43 +0100 |
commit | 7016d21eb3bec1bfb9381292be9f31cc25eadb03 (patch) | |
tree | 7249c8f737db4ee75f1a007e765d2c51bedb7637 /erts/emulator/beam/dist.c | |
parent | 4b17e3d6585bac8411d8f58d65d05e90156f5664 (diff) | |
parent | a2b28094081f1b185a31b33e3c1bcb377d6761bb (diff) | |
download | otp-7016d21eb3bec1bfb9381292be9f31cc25eadb03.tar.gz otp-7016d21eb3bec1bfb9381292be9f31cc25eadb03.tar.bz2 otp-7016d21eb3bec1bfb9381292be9f31cc25eadb03.zip |
Merge branch 'sverk/dist-ctrl-msg-overflow' into sverk/dist-ctrl-msg-overflow-master
Diffstat (limited to 'erts/emulator/beam/dist.c')
-rw-r--r-- | erts/emulator/beam/dist.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c index d5443476ec..bab80654d5 100644 --- a/erts/emulator/beam/dist.c +++ b/erts/emulator/beam/dist.c @@ -1136,7 +1136,6 @@ int erts_net_message(Port *prt, Process* rp; DeclareTmpHeapNoproc(ctl_default,DIST_CTL_DEFAULT_SIZE); Eterm* ctl = ctl_default; - ErlOffHeap off_heap; ErtsHeapFactory factory; Eterm* hp; Sint type; @@ -1151,9 +1150,6 @@ int erts_net_message(Port *prt, #endif UseTmpHeapNoproc(DIST_CTL_DEFAULT_SIZE); - /* Thanks to Luke Gorrie */ - off_heap.first = NULL; - off_heap.overhead = 0; ERTS_SMP_CHK_NO_PROC_LOCKS; @@ -1214,7 +1210,7 @@ int erts_net_message(Port *prt, } hp = ctl; - erts_factory_static_init(&factory, ctl, ctl_len, &off_heap); + erts_factory_tmp_init(&factory, ctl, ctl_len, ERTS_ALC_T_DCTRL_BUF); arg = erts_decode_dist_ext(&factory, &ede); if (is_non_value(arg)) { #ifdef ERTS_DIST_MSG_DBG @@ -1702,7 +1698,7 @@ int erts_net_message(Port *prt, goto invalid_message; } - erts_cleanup_offheap(&off_heap); + erts_factory_close(&factory); if (ctl != ctl_default) { erts_free(ERTS_ALC_T_DCTRL_BUF, (void *) ctl); } @@ -1717,7 +1713,7 @@ int erts_net_message(Port *prt, } data_error: PURIFY_MSG("data error"); - erts_cleanup_offheap(&off_heap); + erts_factory_close(&factory); if (ctl != ctl_default) { erts_free(ERTS_ALC_T_DCTRL_BUF, (void *) ctl); } |