comparison src/os/windows/vm/os_windows.cpp @ 79:82db0859acbe

6642862: Code cache allocation fails with large pages after 6588638 Reviewed-by: apetrusenko
author jcoomes
date Fri, 28 Mar 2008 23:35:42 -0700
parents cd0742ba123c
children ba764ed4b6f2 fcbfc50865ab
comparison
equal deleted inserted replaced
78:e1e86702e43e 79:82db0859acbe
2514 // and committed in a single VirtualAlloc() call. This may change in the 2514 // and committed in a single VirtualAlloc() call. This may change in the
2515 // future, but with Windows 2003 it's not possible to commit on demand. 2515 // future, but with Windows 2003 it's not possible to commit on demand.
2516 return false; 2516 return false;
2517 } 2517 }
2518 2518
2519 bool os::can_execute_large_page_memory() {
2520 return true;
2521 }
2522
2519 char* os::reserve_memory_special(size_t bytes) { 2523 char* os::reserve_memory_special(size_t bytes) {
2520 DWORD flag = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES; 2524 DWORD flag = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES;
2521 char * res = (char *)VirtualAlloc(NULL, bytes, flag, PAGE_READWRITE); 2525 char * res = (char *)VirtualAlloc(NULL, bytes, flag, PAGE_EXECUTE_READWRITE);
2522 return res; 2526 return res;
2523 } 2527 }
2524 2528
2525 bool os::release_memory_special(char* base, size_t bytes) { 2529 bool os::release_memory_special(char* base, size_t bytes) {
2526 return release_memory(base, bytes); 2530 return release_memory(base, bytes);