1318 if (VerifyBeforeIteration) { |
1318 if (VerifyBeforeIteration) { |
1319 Universe::verify(); |
1319 Universe::verify(); |
1320 } |
1320 } |
1321 |
1321 |
1322 // do the iteration |
1322 // do the iteration |
|
1323 // If this operation encounters a bad object when using CMS, |
|
1324 // consider using safe_object_iterate() which avoids perm gen |
|
1325 // objects that may contain bad references. |
1323 Universe::heap()->object_iterate(_blk); |
1326 Universe::heap()->object_iterate(_blk); |
1324 |
1327 |
1325 // when sharing is enabled we must iterate over the shared spaces |
1328 // when sharing is enabled we must iterate over the shared spaces |
1326 if (UseSharedSpaces) { |
1329 if (UseSharedSpaces) { |
1327 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
1330 GenCollectedHeap* gch = GenCollectedHeap::heap(); |