6642862: Code cache allocation fails with large pages after 6588638

Reviewed-by: apetrusenko
This commit is contained in:
John Coomes 2008-03-28 23:35:42 -07:00
parent 2ea233816f
commit 5ac01e984f
7 changed files with 22 additions and 6 deletions

View file

@ -2516,9 +2516,13 @@ bool os::can_commit_large_page_memory() {
return false;
}
bool os::can_execute_large_page_memory() {
return true;
}
char* os::reserve_memory_special(size_t bytes) {
DWORD flag = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES;
char * res = (char *)VirtualAlloc(NULL, bytes, flag, PAGE_READWRITE);
char * res = (char *)VirtualAlloc(NULL, bytes, flag, PAGE_EXECUTE_READWRITE);
return res;
}