aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2012-11-23 16:25:48 +0100
committerPatrik Nyblom <[email protected]>2012-11-23 16:25:48 +0100
commit810e9cd7a8f357cfee506d566f33c214e17e4af1 (patch)
treeb19d6a84789f94ca07cfc2e80f0630710af09cbd
parentef0ca0ec93bffe459ad1a510f430cd91b08e29a2 (diff)
parent35c32355088eb86c3a118dc14dbc9bf5a6f2913b (diff)
downloadotp-810e9cd7a8f357cfee506d566f33c214e17e4af1.tar.gz
otp-810e9cd7a8f357cfee506d566f33c214e17e4af1.tar.bz2
otp-810e9cd7a8f357cfee506d566f33c214e17e4af1.zip
Merge branch 'maint'
Conflicts: erts/doc/src/erlang.xml
-rw-r--r--erts/emulator/beam/erl_gc.c15
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 */