< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp

Print this page
rev 59424 : 8245757: Shenandoah: AlwaysPreTouch should not disable heap resizing or uncommits
Reviewed-by: XXX

@@ -624,10 +624,13 @@
     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");
   }
+  if (AlwaysPreTouch) {
+    os::pretouch_memory(bottom(), end(), heap->pretouch_heap_page_size());
+  }
   heap->increase_committed(ShenandoahHeapRegion::region_size_bytes());
 }
 
 void ShenandoahHeapRegion::do_uncommit() {
   ShenandoahHeap* heap = ShenandoahHeap::heap();
< prev index next >