aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_gc.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-13 14:22:31 +0100
committerRickard Green <[email protected]>2017-01-13 14:22:31 +0100
commit5de2d73abd5d369676e43acd17a9d9db9795ccd5 (patch)
treea4f04067c1b764e94d66a6aa3b4cad5b9c8ff2b2 /erts/emulator/beam/erl_gc.c
parent8df00f51a4a2c0c6788b3dcf3c6be56c50e44461 (diff)
downloadotp-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_gc.c')
-rw-r--r--erts/emulator/beam/erl_gc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 561e7fbdee..ace1524326 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -110,7 +110,6 @@ typedef struct {
static Uint setup_rootset(Process*, Eterm*, int, Rootset*);
static void cleanup_rootset(Rootset *rootset);
-static void deallocate_previous_young_generation(Process *c_p);
static Eterm *full_sweep_heaps(Process *p,
int hibernate,
Eterm *n_heap, Eterm* n_htop,
@@ -839,7 +838,7 @@ erts_garbage_collect_hibernate(Process* p)
disallow_heap_frag_ref_in_heap(p, heap, htop);
#endif
- deallocate_previous_young_generation(p);
+ erts_deallocate_young_generation(p);
p->heap = heap;
p->high_water = htop;
@@ -1496,7 +1495,7 @@ do_minor(Process *p, ErlHeapFragment *live_hf_end,
disallow_heap_frag_ref_in_heap(p, n_heap, n_htop);
#endif
- deallocate_previous_young_generation(p);
+ erts_deallocate_young_generation(p);
HEAP_START(p) = n_heap;
HEAP_TOP(p) = n_htop;
@@ -1594,7 +1593,7 @@ major_collection(Process* p, ErlHeapFragment *live_hf_end,
disallow_heap_frag_ref_in_heap(p, n_heap, n_htop);
#endif
- deallocate_previous_young_generation(p);
+ erts_deallocate_young_generation(p);
HEAP_START(p) = n_heap;
HEAP_TOP(p) = n_htop;
@@ -1756,8 +1755,8 @@ adjust_after_fullsweep(Process *p, int need, Eterm *objv, int nobj)
return adjusted;
}
-static void
-deallocate_previous_young_generation(Process *c_p)
+void
+erts_deallocate_young_generation(Process *c_p)
{
Eterm *orig_heap;