diff options
author | Sverker Eriksson <[email protected]> | 2016-05-31 20:18:07 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-05-31 20:18:07 +0200 |
commit | 14210c8cf4f8088831e0d7b4a1b66b7eb639ac4b (patch) | |
tree | bb42364dd299270b8bfbd8e37938fc8e8bce6476 /erts/emulator | |
parent | 379d30b6f4c57528187a837220c08240e386d639 (diff) | |
parent | ca3c71f3e22b93bc633562d0d1a2f6479c21b223 (diff) | |
download | otp-14210c8cf4f8088831e0d7b4a1b66b7eb639ac4b.tar.gz otp-14210c8cf4f8088831e0d7b4a1b66b7eb639ac4b.tar.bz2 otp-14210c8cf4f8088831e0d7b4a1b66b7eb639ac4b.zip |
Merge branch 'sverker/gc_rare_map_overflow'
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index c7bbbd5ca0..d0d74bbf44 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -1183,22 +1183,14 @@ minor_collection(Process* p, ErlHeapFragment *live_hf_end, adjust_size = p->htop - p->heap; } - goto done; } + else if (need_after > HEAP_SIZE(p)) { + grow_new_heap(p, next_heap_size(p, need_after, 0), objv, nobj); + adjust_size = p->htop - p->heap; + } + /*else: The heap size turned out to be just right. We are done. */ - if (HEAP_SIZE(p) >= need_after) { - /* - * The heap size turned out to be just right. We are done. - */ - goto done; - } - - grow_new_heap(p, next_heap_size(p, need_after, 0), objv, nobj); - adjust_size = p->htop - p->heap; - - done: ASSERT(HEAP_SIZE(p) == next_heap_size(p, HEAP_SIZE(p), 0)); - ASSERT(MBUF(p) == NULL); /* The heap usage during GC should be larger than what we end up after a GC, even if we grow it. If this assertion is not true @@ -1591,6 +1583,9 @@ major_collection(Process* p, ErlHeapFragment *live_hf_end, HIGH_WATER(p) = HEAP_TOP(p); +#ifdef HARDDEBUG + disallow_heap_frag_ref_in_heap(p); +#endif remove_message_buffers(p); if (p->flags & F_ON_HEAP_MSGQ) @@ -1603,9 +1598,6 @@ major_collection(Process* p, ErlHeapFragment *live_hf_end, adjusted = adjust_after_fullsweep(p, need, objv, nobj); -#ifdef HARDDEBUG - disallow_heap_frag_ref_in_heap(p); -#endif ErtsGcQuickSanityCheck(p); return gc_cost(size_after, adjusted ? size_after : 0); |