2699 DEFINE_FAST_GETFIELD(jlong, long, Long) 2700 DEFINE_FAST_GETFIELD(jfloat, float, Float) 2701 DEFINE_FAST_GETFIELD(jdouble, double, Double) 2702 2703 address os::win32::fast_jni_accessor_wrapper(BasicType type) { 2704 switch (type) { 2705 case T_BOOLEAN: return (address)jni_fast_GetBooleanField_wrapper; 2706 case T_BYTE: return (address)jni_fast_GetByteField_wrapper; 2707 case T_CHAR: return (address)jni_fast_GetCharField_wrapper; 2708 case T_SHORT: return (address)jni_fast_GetShortField_wrapper; 2709 case T_INT: return (address)jni_fast_GetIntField_wrapper; 2710 case T_LONG: return (address)jni_fast_GetLongField_wrapper; 2711 case T_FLOAT: return (address)jni_fast_GetFloatField_wrapper; 2712 case T_DOUBLE: return (address)jni_fast_GetDoubleField_wrapper; 2713 default: ShouldNotReachHere(); 2714 } 2715 return (address)-1; 2716 } 2717 #endif 2718 2719 #ifndef PRODUCT 2720 void os::win32::call_test_func_with_wrapper(void (*funcPtr)(void)) { 2721 // Install a win32 structured exception handler around the test 2722 // function call so the VM can generate an error dump if needed. 2723 __try { 2724 (*funcPtr)(); 2725 } __except(topLevelExceptionFilter( 2726 (_EXCEPTION_POINTERS*)_exception_info())) { 2727 // Nothing to do. 2728 } 2729 } 2730 #endif 2731 2732 // Virtual Memory 2733 2734 int os::vm_page_size() { return os::win32::vm_page_size(); } 2735 int os::vm_allocation_granularity() { 2736 return os::win32::vm_allocation_granularity(); 2737 } 2738 2739 // Windows large page support is available on Windows 2003. In order to use 2740 // large page memory, the administrator must first assign additional privilege 2741 // to the user: 2742 // + select Control Panel -> Administrative Tools -> Local Security Policy 2743 // + select Local Policies -> User Rights Assignment 2744 // + double click "Lock pages in memory", add users and/or groups 2745 // + reboot 2746 // Note the above steps are needed for administrator as well, as administrators 2747 // by default do not have the privilege to lock pages in memory. 2748 // 2749 // Note about Windows 2003: although the API supports committing large page 2750 // memory on a page-by-page basis and VirtualAlloc() returns success under this | 2699 DEFINE_FAST_GETFIELD(jlong, long, Long) 2700 DEFINE_FAST_GETFIELD(jfloat, float, Float) 2701 DEFINE_FAST_GETFIELD(jdouble, double, Double) 2702 2703 address os::win32::fast_jni_accessor_wrapper(BasicType type) { 2704 switch (type) { 2705 case T_BOOLEAN: return (address)jni_fast_GetBooleanField_wrapper; 2706 case T_BYTE: return (address)jni_fast_GetByteField_wrapper; 2707 case T_CHAR: return (address)jni_fast_GetCharField_wrapper; 2708 case T_SHORT: return (address)jni_fast_GetShortField_wrapper; 2709 case T_INT: return (address)jni_fast_GetIntField_wrapper; 2710 case T_LONG: return (address)jni_fast_GetLongField_wrapper; 2711 case T_FLOAT: return (address)jni_fast_GetFloatField_wrapper; 2712 case T_DOUBLE: return (address)jni_fast_GetDoubleField_wrapper; 2713 default: ShouldNotReachHere(); 2714 } 2715 return (address)-1; 2716 } 2717 #endif 2718 2719 void os::win32::call_test_func_with_wrapper(void (*funcPtr)(void)) { 2720 // Install a win32 structured exception handler around the test 2721 // function call so the VM can generate an error dump if needed. 2722 __try { 2723 (*funcPtr)(); 2724 } __except(topLevelExceptionFilter( 2725 (_EXCEPTION_POINTERS*)_exception_info())) { 2726 // Nothing to do. 2727 } 2728 } 2729 2730 // Virtual Memory 2731 2732 int os::vm_page_size() { return os::win32::vm_page_size(); } 2733 int os::vm_allocation_granularity() { 2734 return os::win32::vm_allocation_granularity(); 2735 } 2736 2737 // Windows large page support is available on Windows 2003. In order to use 2738 // large page memory, the administrator must first assign additional privilege 2739 // to the user: 2740 // + select Control Panel -> Administrative Tools -> Local Security Policy 2741 // + select Local Policies -> User Rights Assignment 2742 // + double click "Lock pages in memory", add users and/or groups 2743 // + reboot 2744 // Note the above steps are needed for administrator as well, as administrators 2745 // by default do not have the privilege to lock pages in memory. 2746 // 2747 // Note about Windows 2003: although the API supports committing large page 2748 // memory on a page-by-page basis and VirtualAlloc() returns success under this |