src/share/vm/gc_implementation/shared/markSweep.cpp

changeset 1750
c385bf94cfb8
parent 1746
2a1472c30599
child 1907
c18cbe5936b8
equal deleted inserted replaced
1749:3f0549ed0c98 1750:c385bf94cfb8
109 while (!_marking_stack->is_empty()) { 109 while (!_marking_stack->is_empty()) {
110 oop obj = _marking_stack->pop(); 110 oop obj = _marking_stack->pop();
111 assert (obj->is_gc_marked(), "p must be marked"); 111 assert (obj->is_gc_marked(), "p must be marked");
112 obj->follow_contents(); 112 obj->follow_contents();
113 } 113 }
114 while (!_objarray_stack->is_empty()) { 114 // Process ObjArrays one at a time to avoid marking stack bloat.
115 if (!_objarray_stack->is_empty()) {
115 ObjArrayTask task = _objarray_stack->pop(); 116 ObjArrayTask task = _objarray_stack->pop();
116 objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint(); 117 objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
117 k->oop_follow_contents(task.obj(), task.index()); 118 k->oop_follow_contents(task.obj(), task.index());
118 } 119 }
119 } while (!_marking_stack->is_empty() || !_objarray_stack->is_empty()); 120 } while (!_marking_stack->is_empty() || !_objarray_stack->is_empty());

mercurial