diff src/share/vm/gc_implementation/shared/mutableSpace.cpp @ 22973:340ca8812af9

8067469: G1 ignores AlwaysPreTouch Summary: Factor out pretouch code of the various virtual space management classes and use them everywhere including in G1. Reviewed-by: stefank, ehelin, dholmes
author tschatzl
date Thu, 18 Dec 2014 09:37:02 +0100
parents 78bbf4d43a14
children dd9cc155639c
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/shared/mutableSpace.cpp	Mon Sep 15 10:57:22 2014 +0200
+++ b/src/share/vm/gc_implementation/shared/mutableSpace.cpp	Thu Dec 18 09:37:02 2014 +0100
@@ -62,9 +62,7 @@
 }
 
 void MutableSpace::pretouch_pages(MemRegion mr) {
-  for (volatile char *p = (char*)mr.start(); p < (char*)mr.end(); p += os::vm_page_size()) {
-    char t = *p; *p = t;
-  }
+  os::pretouch_memory((char*)mr.start(), (char*)mr.end());
 }
 
 void MutableSpace::initialize(MemRegion mr,