aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-17 12:31:33 +0100
committerRickard Green <[email protected]>2017-01-17 12:31:33 +0100
commit968b6b656abd90a8f9d7bc058bce255a57502fc7 (patch)
tree7b5053917c9e512541a1e86808709168e1ebcd9b /erts/emulator/beam/erl_process.c
parent268fa11bc6904809643a4f99cb6f7c35edabf5dd (diff)
parent6db6cd94682d05eddbfa8b712419e70576d20846 (diff)
downloadotp-968b6b656abd90a8f9d7bc058bce255a57502fc7.tar.gz
otp-968b6b656abd90a8f9d7bc058bce255a57502fc7.tar.bz2
otp-968b6b656abd90a8f9d7bc058bce255a57502fc7.zip
Merge branch 'maint'
* maint: Fix memory leak of temporary heap
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 6928b282ee..8ce5e28773 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -11972,7 +11972,6 @@ erts_cleanup_empty_process(Process* p)
static void
delete_process(Process* p)
{
- Eterm *heap;
ErtsPSD *psd;
struct saved_calls *scb;
process_breakpoint_time_t *pbt;
@@ -12027,13 +12026,8 @@ delete_process(Process* p)
hipe_delete_process(&p->hipe);
#endif
- heap = p->abandoned_heap ? p->abandoned_heap : p->heap;
+ erts_deallocate_young_generation(p);
-#ifdef DEBUG
- sys_memset(heap, DEBUG_BAD_BYTE, p->heap_sz*sizeof(Eterm));
-#endif
-
- ERTS_HEAP_FREE(ERTS_ALC_T_HEAP, (void*) heap, p->heap_sz*sizeof(Eterm));
if (p->old_heap != NULL) {
#ifdef DEBUG
@@ -12045,16 +12039,6 @@ delete_process(Process* p)
(p->old_hend-p->old_heap)*sizeof(Eterm));
}
- /*
- * Free all pending message buffers.
- */
- if (p->mbuf != NULL) {
- free_message_buffer(p->mbuf);
- }
-
- if (p->msg_frag)
- erts_cleanup_messages(p->msg_frag);
-
erts_erase_dicts(p);
/* free all pending messages */