diff options
author | Rickard Green <[email protected]> | 2016-06-28 17:40:45 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-08-30 16:58:15 +0200 |
commit | f36e430a1482ee91d7f8b5ff72477ee6882b876d (patch) | |
tree | 879cdece142a9f7d250e3e4c1e68ceb010a4c6fa /erts/emulator/beam/erl_gc.c | |
parent | 925984e94f2c1933bb659dfb626c191982b7c8d4 (diff) | |
download | otp-f36e430a1482ee91d7f8b5ff72477ee6882b876d.tar.gz otp-f36e430a1482ee91d7f8b5ff72477ee6882b876d.tar.bz2 otp-f36e430a1482ee91d7f8b5ff72477ee6882b876d.zip |
Ensure correct mbuf_sz value in process structure
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index 8b0dd9a5a6..75f8ebefbd 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -517,6 +517,8 @@ delay_garbage_collection(Process *p, ErlHeapFragment *live_hf_end, int need, int erts_proc_sched_data((p))->virtual_reds += vreds; } + ERTS_CHK_MBUF_SZ(p); + ASSERT(CONTEXT_REDS >= erts_proc_sched_data(p)->virtual_reds); return reds_left; } @@ -527,6 +529,8 @@ young_gen_usage(Process *p) Uint hsz; Eterm *aheap; + ERTS_CHK_MBUF_SZ(p); + hsz = p->mbuf_sz; if (p->flags & F_ON_HEAP_MSGQ) { @@ -590,6 +594,8 @@ garbage_collect(Process* p, ErlHeapFragment *live_hf_end, DTRACE_CHARBUF(pidbuf, DTRACE_TERM_BUF_SIZE); #endif + ERTS_CHK_MBUF_SZ(p); + ASSERT(CONTEXT_REDS - ERTS_REDS_LEFT(p, fcalls) >= erts_proc_sched_data(p)->virtual_reds); |