aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process_dump.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-11 16:51:41 +0100
committerRickard Green <[email protected]>2017-01-11 16:51:41 +0100
commit9d029dd04ad1a6a9e9725952b83d7cbdddfca088 (patch)
tree7cc405b8c60d0a3c7a5cc7648da46a69b218a0f9 /erts/emulator/beam/erl_process_dump.c
parent4e48180f1e9a59e02a8b4a0276ea89b928910ad9 (diff)
parent8df00f51a4a2c0c6788b3dcf3c6be56c50e44461 (diff)
downloadotp-9d029dd04ad1a6a9e9725952b83d7cbdddfca088.tar.gz
otp-9d029dd04ad1a6a9e9725952b83d7cbdddfca088.tar.bz2
otp-9d029dd04ad1a6a9e9725952b83d7cbdddfca088.zip
Merge branch 'rickard/abandoned-heap-bugs' into maint
OTP-14134 OTP-14135 * rickard/abandoned-heap-bugs: 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)