diff src/os/windows/vm/os_windows.cpp @ 3318:188c9a5d6a6d

7040485: Use transparent huge page on linux by default Summary: Turn on UseLargePages by default but try only HugeTLBFS method if it is not explicitly specified on the command line. Reviewed-by: ysr
author iveresov
date Fri, 29 Apr 2011 12:39:32 -0700
parents 5504afd15955
children 7c948af3e651 bf6481e5f96d
line wrap: on
line diff
--- a/src/os/windows/vm/os_windows.cpp	Thu Apr 28 15:29:18 2011 -0700
+++ b/src/os/windows/vm/os_windows.cpp	Fri Apr 29 12:39:32 2011 -0700
@@ -2762,8 +2762,8 @@
   _hToken = NULL;
 }
 
-bool os::large_page_init() {
-  if (!UseLargePages) return false;
+void os::large_page_init() {
+  if (!UseLargePages) return;
 
   // print a warning if any large page related flag is specified on command line
   bool warn_on_failure = !FLAG_IS_DEFAULT(UseLargePages) ||
@@ -2808,7 +2808,7 @@
   }
 
   cleanup_after_large_page_init();
-  return success;
+  UseLargePages = success;
 }
 
 // On win32, one cannot release just a part of reserved memory, it's an
@@ -3561,7 +3561,7 @@
 #endif
 }
 
-  FLAG_SET_DEFAULT(UseLargePages, os::large_page_init());
+  os::large_page_init();
 
   // Setup Windows Exceptions