comparison 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
comparison
equal deleted inserted replaced
22972:41a855ff6305 22973:340ca8812af9
60 } 60 }
61 } 61 }
62 } 62 }
63 63
64 void MutableSpace::pretouch_pages(MemRegion mr) { 64 void MutableSpace::pretouch_pages(MemRegion mr) {
65 for (volatile char *p = (char*)mr.start(); p < (char*)mr.end(); p += os::vm_page_size()) { 65 os::pretouch_memory((char*)mr.start(), (char*)mr.end());
66 char t = *p; *p = t;
67 }
68 } 66 }
69 67
70 void MutableSpace::initialize(MemRegion mr, 68 void MutableSpace::initialize(MemRegion mr,
71 bool clear_space, 69 bool clear_space,
72 bool mangle_space, 70 bool mangle_space,