diff options
author | Sverker Eriksson <[email protected]> | 2017-01-17 15:53:18 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-01-17 15:53:18 +0100 |
commit | b8c29d61253ee75515a11da6fc349fb9933d03c3 (patch) | |
tree | c2a4d1325c5695d2870e4feb987ed5ffca14dd75 /erts/emulator/beam/erl_trace.c | |
parent | 919d35b4d17e9a896aca02cf22d6514d38a8b205 (diff) | |
parent | 9b6643e4c573e4a5536a48f8115f12d0b99f9d41 (diff) | |
download | otp-b8c29d61253ee75515a11da6fc349fb9933d03c3.tar.gz otp-b8c29d61253ee75515a11da6fc349fb9933d03c3.tar.bz2 otp-b8c29d61253ee75515a11da6fc349fb9933d03c3.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam/erl_trace.c')
-rw-r--r-- | erts/emulator/beam/erl_trace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c index 9be4741ec8..04f3160d42 100644 --- a/erts/emulator/beam/erl_trace.c +++ b/erts/emulator/beam/erl_trace.c @@ -1435,6 +1435,7 @@ void trace_gc(Process *p, Eterm what, Uint size, Eterm msg) { ErtsTracerNif *tnif = NULL; + Eterm* o_hp = NULL; Eterm* hp; Uint sz = 0; Eterm tup; @@ -1445,7 +1446,7 @@ trace_gc(Process *p, Eterm what, Uint size, Eterm msg) if (is_non_value(msg)) { (void) erts_process_gc_info(p, &sz, NULL, 0, 0); - hp = HAlloc(p, sz + 3 + 2); + o_hp = hp = erts_alloc(ERTS_ALC_T_TMP, (sz + 3 + 2) * sizeof(Eterm)); msg = erts_process_gc_info(p, NULL, &hp, 0, 0); tup = TUPLE2(hp, am_wordsize, make_small(size)); hp += 3; @@ -1454,6 +1455,8 @@ trace_gc(Process *p, Eterm what, Uint size, Eterm msg) send_to_tracer_nif(p, &p->common, p->common.id, tnif, TRACE_FUN_T_GC, what, msg, THE_NON_VALUE, am_true); + if (o_hp) + erts_free(ERTS_ALC_T_TMP, o_hp); } } |