8067469: G1 ignores AlwaysPreTouch

Factor out pretouch code of the various virtual space management classes and use them everywhere including in G1.

Reviewed-by: stefank, ehelin, dholmes
This commit is contained in:
Thomas Schatzl 2014-12-18 09:37:02 +01:00
parent 12273757f7
commit f2e110fe77
5 changed files with 16 additions and 16 deletions

View file

@ -1588,6 +1588,11 @@ bool os::release_memory(char* addr, size_t bytes) {
return res;
}
void os::pretouch_memory(char* start, char* end) {
for (volatile char *p = start; p < end; p += os::vm_page_size()) {
*p = 0;
}
}
char* os::map_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,