mirror of
https://github.com/corda/corda.git
synced 2025-01-14 16:59:52 +00:00
more GC stress fixes
This commit is contained in:
parent
6dec1cbd42
commit
6bac351874
@ -1419,7 +1419,8 @@ makeHeap(System* system)
|
||||
return Reachable;
|
||||
} else if (c.nextGen2.contains(p)
|
||||
or (c.gen2.contains(p)
|
||||
and c.gen2.indexOf(p) >= c.gen2Base))
|
||||
and (c.mode == ::MinorCollection
|
||||
or c.gen2.indexOf(p) >= c.gen2Base)))
|
||||
{
|
||||
return Tenured;
|
||||
} else if (wasCollected(&c, p)) {
|
||||
|
@ -1341,6 +1341,11 @@ Thread::dispose()
|
||||
systemThread = 0;
|
||||
}
|
||||
|
||||
#ifdef VM_STRESS
|
||||
vm->system->free(heap);
|
||||
heap = 0;
|
||||
#endif // VM_STRESS
|
||||
|
||||
if (allocator) {
|
||||
allocator->free(this);
|
||||
}
|
||||
@ -1377,7 +1382,8 @@ enter(Thread* t, Thread::State s)
|
||||
|
||||
switch (s) {
|
||||
case Thread::ExclusiveState: {
|
||||
assert(t, t->state == Thread::ActiveState);
|
||||
assert(t, t->state == Thread::ActiveState
|
||||
or t->state == Thread::ExitState);
|
||||
|
||||
while (t->vm->exclusive) {
|
||||
// another thread got here first.
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace vm {
|
||||
|
||||
const bool Verbose = false;
|
||||
const bool DebugRun = true;
|
||||
const bool DebugRun = false;
|
||||
const bool DebugStack = false;
|
||||
const bool DebugMonitors = false;
|
||||
|
||||
@ -1221,7 +1221,10 @@ collect(Thread* t, Heap::CollectionType type);
|
||||
inline void
|
||||
stress(Thread* t)
|
||||
{
|
||||
if ((not t->stress) and t->state != Thread::NoState) {
|
||||
if ((not t->stress)
|
||||
and t->state != Thread::NoState
|
||||
and t->state != Thread::IdleState)
|
||||
{
|
||||
t->stress = true;
|
||||
{ ENTER(t, Thread::ExclusiveState);
|
||||
|
||||
|
@ -396,6 +396,8 @@ invokeNative(Thread* t, object method)
|
||||
return VoidField;
|
||||
}
|
||||
|
||||
PROTECT(t, data);
|
||||
|
||||
pushFrame(t, method);
|
||||
|
||||
unsigned count = methodParameterCount(t, method);
|
||||
|
Loading…
Reference in New Issue
Block a user