hotspot/src/os/windows/vm/os_windows.cpp
changeset 19546 f6b7c9e96ea3
parent 19274 a09ed3dff789
child 19560 d44eb8cd7ecc
equal deleted inserted replaced
19544:8f3ad1962aef 19546:f6b7c9e96ea3
  3154 
  3154 
  3155 bool os::can_execute_large_page_memory() {
  3155 bool os::can_execute_large_page_memory() {
  3156   return true;
  3156   return true;
  3157 }
  3157 }
  3158 
  3158 
  3159 char* os::reserve_memory_special(size_t bytes, char* addr, bool exec) {
  3159 char* os::reserve_memory_special(size_t bytes, size_t alignment, char* addr, bool exec) {
       
  3160   assert(UseLargePages, "only for large pages");
       
  3161 
       
  3162   if (!is_size_aligned(bytes, os::large_page_size()) || alignment > os::large_page_size()) {
       
  3163     return NULL; // Fallback to small pages.
       
  3164   }
  3160 
  3165 
  3161   const DWORD prot = exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
  3166   const DWORD prot = exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
  3162   const DWORD flags = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES;
  3167   const DWORD flags = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES;
  3163 
  3168 
  3164   // with large pages, there are two cases where we need to use Individual Allocation
  3169   // with large pages, there are two cases where we need to use Individual Allocation
  5636     _OpenProcessToken != NULL &&
  5641     _OpenProcessToken != NULL &&
  5637     _LookupPrivilegeValue != NULL;
  5642     _LookupPrivilegeValue != NULL;
  5638 }
  5643 }
  5639 
  5644 
  5640 #endif
  5645 #endif
       
  5646 
       
  5647 #ifndef PRODUCT
       
  5648 void TestReserveMemorySpecial_test() {
       
  5649   // No tests available for this platform
       
  5650 }
       
  5651 #endif