mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
fix incorrect reporting of fixie collection status in heap.cpp (part 2)
My earlier fix (f8e8609
) was almost -- but not quite -- sufficient.
It asked the heap to mark the dead fixies too early, so some of them
were marked dead even though they ultimately survived, causing us to
clear weak JNI references when we shouldn't.
This commit is contained in:
parent
2190d0e99a
commit
3a5abaf58a
@ -273,6 +273,8 @@ killZombies(Thread* t, Thread* o)
|
||||
unsigned
|
||||
footprint(Thread* t)
|
||||
{
|
||||
expect(t, t->criticalLevel == 0);
|
||||
|
||||
unsigned n = t->heapOffset + t->heapIndex + t->backupHeapIndex;
|
||||
|
||||
for (Thread* c = t->child; c; c = c->peer) {
|
||||
@ -592,6 +594,8 @@ postVisit(Thread* t, Heap::Visitor* v)
|
||||
m->tenuredWeakReferences = firstNewTenuredWeakReference;
|
||||
}
|
||||
|
||||
m->heap->postVisit();
|
||||
|
||||
for (Reference* r = m->jniReferences; r; r = r->next) {
|
||||
if (r->weak) {
|
||||
if (m->heap->status(r->target) == Heap::Unreachable) {
|
||||
@ -2693,8 +2697,6 @@ class HeapClient: public Heap::Client {
|
||||
virtual void visitRoots(Heap::Visitor* v) {
|
||||
::visitRoots(m, v);
|
||||
|
||||
m->heap->postVisit();
|
||||
|
||||
postVisit(m->rootThread, v);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user