diff options
author | Rickard Green <[email protected]> | 2017-01-13 14:22:31 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-01-13 14:22:31 +0100 |
commit | 5de2d73abd5d369676e43acd17a9d9db9795ccd5 (patch) | |
tree | a4f04067c1b764e94d66a6aa3b4cad5b9c8ff2b2 /erts/emulator/beam/erl_process.c | |
parent | 8df00f51a4a2c0c6788b3dcf3c6be56c50e44461 (diff) | |
download | otp-5de2d73abd5d369676e43acd17a9d9db9795ccd5.tar.gz otp-5de2d73abd5d369676e43acd17a9d9db9795ccd5.tar.bz2 otp-5de2d73abd5d369676e43acd17a9d9db9795ccd5.zip |
Fix memory leak of temporary heap
This bug was introduced in previous commit, and has never been
released in an official OTP version.
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index b345c35a7e..8d13723188 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -11912,7 +11912,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; @@ -11967,13 +11966,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 @@ -11985,16 +11979,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 */ |