本文整理汇总了C++中GenCollectedHeap::clear_incremental_collection_will_fail方法的典型用法代码示例。如果您正苦于以下问题:C++ GenCollectedHeap::clear_incremental_collection_will_fail方法的具体用法?C++ GenCollectedHeap::clear_incremental_collection_will_fail怎么用?C++ GenCollectedHeap::clear_incremental_collection_will_fail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GenCollectedHeap
的用法示例。
在下文中一共展示了GenCollectedHeap::clear_incremental_collection_will_fail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gc_epilogue
void DefNewGeneration::gc_epilogue(bool full) {
// Check if the heap is approaching full after a collection has
// been done. Generally the young generation is empty at
// a minimum at the end of a collection. If it is not, then
// the heap is approaching full.
GenCollectedHeap* gch = GenCollectedHeap::heap();
clear_should_allocate_from_space();
if (collection_attempt_is_safe()) {
gch->clear_incremental_collection_will_fail();
} else {
gch->set_incremental_collection_will_fail();
if (full) { // we seem to be running out of space
set_should_allocate_from_space();
}
}
if (ZapUnusedHeapArea) {
eden()->check_mangled_unused_area_complete();
from()->check_mangled_unused_area_complete();
to()->check_mangled_unused_area_complete();
}
// update the generation and space performance counters
update_counters();
gch->collector_policy()->counters()->update_counters();
}