mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
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:
parent
12273757f7
commit
f2e110fe77
5 changed files with 16 additions and 16 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue