comparison src/os/windows/vm/os_windows.cpp @ 12110:4c84d351cca9

8007074: SIGSEGV at ParMarkBitMap::verify_clear() Summary: Replace the broken large pages implementation on Linux. New flag: -XX:+UseTransparentHugePages - Linux specific flag to turn on transparent huge page hinting with madvise(..., MAP_HUGETLB). Changed behavior: -XX:+UseLargePages - tries to use -XX:+UseTransparentHugePages before trying other large pages implementations (on Linux). Changed behavior: -XX:+UseHugeTLBFS - Use upfront allocation of Large Pages instead of using the broken implementation to dynamically committing large pages. Changed behavior: -XX:LargePageSizeInBytes - Turned off the ability to use this flag on Linux and provides warning to user if set to a value different than the OS chosen large page size. Changed behavior: Setting no large page size - Now defaults to use -XX:UseTransparentHugePages if the OS supports it. Previously, -XX:+UseHugeTLBFS was chosen if the OS was configured to use large pages. Reviewed-by: tschatzl, dcubed, brutisso
author stefank
date Fri, 16 Aug 2013 13:22:32 +0200
parents 98aa538fd97e
children 62f527c674d2
comparison
equal deleted inserted replaced
12108:badf4244ceae 12110:4c84d351cca9
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