本文整理汇总了C++中PSYoungGen::virtual_space方法的典型用法代码示例。如果您正苦于以下问题:C++ PSYoungGen::virtual_space方法的具体用法?C++ PSYoungGen::virtual_space怎么用?C++ PSYoungGen::virtual_space使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PSYoungGen
的用法示例。
在下文中一共展示了PSYoungGen::virtual_space方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create_ps_heap_summary
PSHeapSummary ParallelScavengeHeap::create_ps_heap_summary() {
PSOldGen* old = old_gen();
HeapWord* old_committed_end = (HeapWord*)old->virtual_space()->committed_high_addr();
VirtualSpaceSummary old_summary(old->reserved().start(), old_committed_end, old->reserved().end());
SpaceSummary old_space(old->reserved().start(), old_committed_end, old->used_in_bytes());
PSYoungGen* young = young_gen();
VirtualSpaceSummary young_summary(young->reserved().start(),
(HeapWord*)young->virtual_space()->committed_high_addr(), young->reserved().end());
MutableSpace* eden = young_gen()->eden_space();
SpaceSummary eden_space(eden->bottom(), eden->end(), eden->used_in_bytes());
MutableSpace* from = young_gen()->from_space();
SpaceSummary from_space(from->bottom(), from->end(), from->used_in_bytes());
MutableSpace* to = young_gen()->to_space();
SpaceSummary to_space(to->bottom(), to->end(), to->used_in_bytes());
VirtualSpaceSummary heap_summary = create_heap_space_summary();
return PSHeapSummary(heap_summary, used(), old_summary, old_space, young_summary, eden_space, from_space, to_space);
}