aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_gc.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-05-18 19:34:45 +0200
committerSverker Eriksson <[email protected]>2015-05-18 19:34:45 +0200
commit56c9154f2a0efb8a6d1347b19b797ac17b6608d4 (patch)
treeea33e513a9cd1c077a30789570c5b06b8224de8a /erts/emulator/beam/erl_gc.c
parente5899f39d043409e2a48f34c845ad28cad8a28e6 (diff)
downloadotp-56c9154f2a0efb8a6d1347b19b797ac17b6608d4.tar.gz
otp-56c9154f2a0efb8a6d1347b19b797ac17b6608d4.tar.bz2
otp-56c9154f2a0efb8a6d1347b19b797ac17b6608d4.zip
erts: Fix calculation of reclaimed data during full gc
The old code did not take take the old-heap into acount.
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r--erts/emulator/beam/erl_gc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 1785fc27be..14e7dde778 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -1223,7 +1223,8 @@ major_collection(Process* p, int need, Eterm* objv, int nobj, Uint *recl)
Uint new_sz;
Uint fragments = MBUF_SIZE(p) + combined_message_size(p);
- size_before = fragments + (HEAP_TOP(p) - HEAP_START(p));
+ size_before = fragments + (HEAP_TOP(p) - HEAP_START(p))
+ + (OLD_HTOP(p) - OLD_HEAP(p));
/*
* Do a fullsweep GC. First figure out the size of the heap