4396719: Mark Sweep stack overflow on deeply nested Object arrays

Use an explicit stack for object arrays and process them in chunks.

Reviewed-by: iveresov, apetrusenko
This commit is contained in:
John Coomes 2010-03-03 14:48:26 -08:00
parent 5fdec09798
commit 4f82340476
26 changed files with 419 additions and 182 deletions

View file

@ -479,6 +479,7 @@ void PSMarkSweep::allocate_stacks() {
_preserved_oop_stack = NULL;
_marking_stack = new (ResourceObj::C_HEAP) GrowableArray<oop>(4000, true);
_objarray_stack = new (ResourceObj::C_HEAP) GrowableArray<ObjArrayTask>(50, true);
int size = SystemDictionary::number_of_classes() * 2;
_revisit_klass_stack = new (ResourceObj::C_HEAP) GrowableArray<Klass*>(size, true);
@ -497,6 +498,7 @@ void PSMarkSweep::deallocate_stacks() {
}
delete _marking_stack;
delete _objarray_stack;
delete _revisit_klass_stack;
delete _revisit_mdo_stack;
}