mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
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:
parent
5fdec09798
commit
4f82340476
26 changed files with 419 additions and 182 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue