diff options
author | Patrik Nyblom <[email protected]> | 2012-11-23 16:25:48 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-11-23 16:25:48 +0100 |
commit | 810e9cd7a8f357cfee506d566f33c214e17e4af1 (patch) | |
tree | b19d6a84789f94ca07cfc2e80f0630710af09cbd /erts/emulator/beam | |
parent | ef0ca0ec93bffe459ad1a510f430cd91b08e29a2 (diff) | |
parent | 35c32355088eb86c3a118dc14dbc9bf5a6f2913b (diff) | |
download | otp-810e9cd7a8f357cfee506d566f33c214e17e4af1.tar.gz otp-810e9cd7a8f357cfee506d566f33c214e17e4af1.tar.bz2 otp-810e9cd7a8f357cfee506d566f33c214e17e4af1.zip |
Merge branch 'maint'
Conflicts:
erts/doc/src/erlang.xml
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index 6075a527c3..5ae4b9254b 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -336,6 +336,19 @@ erts_gc_after_bif_call(Process* p, Eterm result, Eterm* regs, Uint arity) return result; } +static ERTS_INLINE void reset_active_writer(Process *p) +{ + struct erl_off_heap_header* ptr; + ptr = MSO(p).first; + while (ptr) { + if (ptr->thing_word == HEADER_PROC_BIN) { + ProcBin *pbp = (ProcBin*) ptr; + pbp->flags &= ~PB_ACTIVE_WRITER; + } + ptr = ptr->next; + } +} + /* * Garbage collect a process. * @@ -391,6 +404,7 @@ erts_garbage_collect(Process* p, int need, Eterm* objv, int nobj) DTRACE2(gc_minor_end, pidbuf, reclaimed_now); } } + reset_active_writer(p); /* * Finish. @@ -2166,7 +2180,6 @@ link_live_proc_bin(struct shrink_cand_data *shrink, if (pbp->flags & PB_ACTIVE_WRITER) { - pbp->flags &= ~PB_ACTIVE_WRITER; shrink->no_of_active++; } else { /* inactive */ |