mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
7087583: Hotspot fails to allocate heap with mmap(MAP_HUGETLB)
Try using small pages when transparent huge pages allocation fails Reviewed-by: ysr
This commit is contained in:
parent
4a09997f51
commit
a9cd50a1c8
1 changed files with 6 additions and 2 deletions
|
@ -2531,10 +2531,14 @@ bool os::commit_memory(char* addr, size_t size, size_t alignment_hint,
|
|||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
// Fall through and try to use small pages
|
||||
}
|
||||
|
||||
return commit_memory(addr, size, exec);
|
||||
if (commit_memory(addr, size, exec)) {
|
||||
realign_memory(addr, size, alignment_hint);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue