mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
8157952: Parallelize Memory Pretouch
Use multiple threads to pretouch memory using -XX:+AlwaysPreTouch to use more memory bandwidth Reviewed-by: jmasa, sangheki
This commit is contained in:
parent
b77d0de3d9
commit
317f1aa044
12 changed files with 124 additions and 39 deletions
|
@ -1705,8 +1705,8 @@ bool os::release_memory(char* addr, size_t bytes) {
|
|||
return res;
|
||||
}
|
||||
|
||||
void os::pretouch_memory(void* start, void* end) {
|
||||
for (volatile char *p = (char*)start; p < (char*)end; p += os::vm_page_size()) {
|
||||
void os::pretouch_memory(void* start, void* end, size_t page_size) {
|
||||
for (volatile char *p = (char*)start; p < (char*)end; p += page_size) {
|
||||
*p = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue