提交 0e56d120 编写于 作者: I iveresov

7087583: Hotspot fails to allocate heap with mmap(MAP_HUGETLB)

Summary: Try using small pages when transparent huge pages allocation fails
Reviewed-by: ysr
上级 c5347e0b
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册