aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process_dump.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-04 17:51:54 +0100
committerRickard Green <[email protected]>2017-01-10 16:37:20 +0100
commit8df00f51a4a2c0c6788b3dcf3c6be56c50e44461 (patch)
tree243394c367d92485dad7c37928c8ddaed405d9fb /erts/emulator/beam/erl_process_dump.c
parent3473ecd83a7bbe7e0bebb865f25dddb93e3bf10f (diff)
downloadotp-8df00f51a4a2c0c6788b3dcf3c6be56c50e44461.tar.gz
otp-8df00f51a4a2c0c6788b3dcf3c6be56c50e44461.tar.bz2
otp-8df00f51a4a2c0c6788b3dcf3c6be56c50e44461.zip
Fix issues with abandoned heap
Diffstat (limited to 'erts/emulator/beam/erl_process_dump.c')
-rw-r--r--erts/emulator/beam/erl_process_dump.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process_dump.c b/erts/emulator/beam/erl_process_dump.c
index d8bb00e8c6..a19db74763 100644
--- a/erts/emulator/beam/erl_process_dump.c
+++ b/erts/emulator/beam/erl_process_dump.c
@@ -90,9 +90,12 @@ Uint erts_process_memory(Process *p, int incl_msg_inq) {
erts_doforall_links(ERTS_P_LINKS(p), &erts_one_link_size, &size);
erts_doforall_monitors(ERTS_P_MONITORS(p), &erts_one_mon_size, &size);
size += (p->heap_sz + p->mbuf_sz) * sizeof(Eterm);
+ if (p->abandoned_heap)
+ size += (p->hend - p->heap) * sizeof(Eterm);
if (p->old_hend && p->old_heap)
size += (p->old_hend - p->old_heap) * sizeof(Eterm);
+
size += p->msg.len * sizeof(ErtsMessage);
for (mp = p->msg.first; mp; mp = mp->next)