more GC stress fixes

This commit is contained in:
Joel Dice
2007-07-16 18:23:23 -06:00
parent 6dec1cbd42
commit 6bac351874
4 changed files with 16 additions and 4 deletions

View File

@ -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.