< prev index next >
src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegion.cpp
Print this page
rev 11156 : [backport] 8220350: Refactor ShenandoahHeap::initialize
Reviewed-by: rkennke, zgu
rev 11158 : [backport] 8220162: Shenandoah should not commit HugeTLBFS memory
Reviewed-by: rkennke, zgu
*** 50,60 ****
size_t ShenandoahHeapRegion::MaxTLABSizeWords = 0;
ShenandoahHeapRegion::ShenandoahHeapRegion(ShenandoahHeap* heap, HeapWord* start,
size_t size_words, size_t index, bool committed) :
_heap(heap),
- _pacer(ShenandoahPacing ? heap->pacer() : NULL),
_reserved(MemRegion(start, size_words)),
_region_number(index),
_new_top(NULL),
_critical_pins(0),
_empty_time(os::elapsedTime()),
--- 50,59 ----
*** 610,630 ****
log_info(gc, init)("Max TLAB size: " SIZE_FORMAT "%s",
byte_size_in_proper_unit(MaxTLABSizeBytes), proper_unit_for_byte_size(MaxTLABSizeBytes));
}
void ShenandoahHeapRegion::do_commit() {
! if (!os::commit_memory((char *) _reserved.start(), _reserved.byte_size(), false)) {
report_java_out_of_memory("Unable to commit region");
}
if (!_heap->commit_bitmap_slice(this)) {
report_java_out_of_memory("Unable to commit bitmaps for region");
}
_heap->increase_committed(ShenandoahHeapRegion::region_size_bytes());
}
void ShenandoahHeapRegion::do_uncommit() {
! if (!os::uncommit_memory((char *) _reserved.start(), _reserved.byte_size())) {
report_java_out_of_memory("Unable to uncommit region");
}
if (!_heap->uncommit_bitmap_slice(this)) {
report_java_out_of_memory("Unable to uncommit bitmaps for region");
}
--- 609,629 ----
log_info(gc, init)("Max TLAB size: " SIZE_FORMAT "%s",
byte_size_in_proper_unit(MaxTLABSizeBytes), proper_unit_for_byte_size(MaxTLABSizeBytes));
}
void ShenandoahHeapRegion::do_commit() {
! if (!_heap->is_heap_region_special() && !os::commit_memory((char *) _reserved.start(), _reserved.byte_size(), false)) {
report_java_out_of_memory("Unable to commit region");
}
if (!_heap->commit_bitmap_slice(this)) {
report_java_out_of_memory("Unable to commit bitmaps for region");
}
_heap->increase_committed(ShenandoahHeapRegion::region_size_bytes());
}
void ShenandoahHeapRegion::do_uncommit() {
! if (!_heap->is_heap_region_special() && !os::uncommit_memory((char *) _reserved.start(), _reserved.byte_size())) {
report_java_out_of_memory("Unable to uncommit region");
}
if (!_heap->uncommit_bitmap_slice(this)) {
report_java_out_of_memory("Unable to uncommit bitmaps for region");
}
< prev index next >