fix stack overflow in stress() due to StateResource destructor

This commit is contained in:
Joel Dice 2007-07-15 19:07:13 -06:00
parent 4670055b03
commit 7dab93de00
2 changed files with 5 additions and 4 deletions

View File

@ -17,7 +17,7 @@ const unsigned MinimumGen2SizeInBytes = 128 * 1024;
const unsigned Top = ~static_cast<unsigned>(0);
const bool Verbose = true;
const bool Verbose = false;
const bool Debug = false;
class Context;

View File

@ -1221,13 +1221,14 @@ stress(Thread* t)
{
if ((not t->stress) and t->state != Thread::NoState) {
t->stress = true;
ENTER(t, Thread::ExclusiveState);
{ ENTER(t, Thread::ExclusiveState);
# ifdef VM_STRESS_MAJOR
collect(t, Heap::MajorCollection);
# else // not VM_STRESS_MAJOR
collect(t, Heap::MinorCollection);
# endif // not VM_STRESS_MAJOR
}
t->stress = false;
}