84 static bool is_windows_2003() { return _is_windows_2003; }
85
86 // Returns the byte size of a virtual memory page
87 static int vm_page_size() { return _vm_page_size; }
88
89 // Returns the size in bytes of memory blocks which can be allocated.
90 static int vm_allocation_granularity() { return _vm_allocation_granularity; }
91
92 // Read the headers for the executable that started the current process into
93 // the structure passed in (see winnt.h).
94 static void read_executable_headers(PIMAGE_NT_HEADERS);
95
96 // Default stack size for the current process.
97 static size_t default_stack_size() { return _default_stack_size; }
98
99 #ifndef _WIN64
100 // A wrapper to install a structured exception handler for fast JNI accesors.
101 static address fast_jni_accessor_wrapper(BasicType);
102 #endif
103
104 #ifndef PRODUCT
105 static void call_test_func_with_wrapper(void (*funcPtr)(void));
106 #endif
107
108 // filter function to ignore faults on serializations page
109 static LONG WINAPI serialize_fault_filter(struct _EXCEPTION_POINTERS* e);
110 };
111
112 /*
113 * Crash protection for the watcher thread. Wrap the callback
114 * with a __try { call() }
115 * To be able to use this - don't take locks, don't rely on destructors,
116 * don't make OS library calls, don't allocate memory, don't print,
117 * don't call code that could leave the heap / memory in an inconsistent state,
118 * or anything else where we are not in control if we suddenly jump out.
119 */
120 class WatcherThreadCrashProtection : public StackObj {
121 public:
122 WatcherThreadCrashProtection();
123 bool call(os::CrashProtectionCallback& cb);
124 };
125
126 class PlatformEvent : public CHeapObj<mtInternal> {
|
84 static bool is_windows_2003() { return _is_windows_2003; }
85
86 // Returns the byte size of a virtual memory page
87 static int vm_page_size() { return _vm_page_size; }
88
89 // Returns the size in bytes of memory blocks which can be allocated.
90 static int vm_allocation_granularity() { return _vm_allocation_granularity; }
91
92 // Read the headers for the executable that started the current process into
93 // the structure passed in (see winnt.h).
94 static void read_executable_headers(PIMAGE_NT_HEADERS);
95
96 // Default stack size for the current process.
97 static size_t default_stack_size() { return _default_stack_size; }
98
99 #ifndef _WIN64
100 // A wrapper to install a structured exception handler for fast JNI accesors.
101 static address fast_jni_accessor_wrapper(BasicType);
102 #endif
103
104 static void call_test_func_with_wrapper(void (*funcPtr)(void));
105
106 // filter function to ignore faults on serializations page
107 static LONG WINAPI serialize_fault_filter(struct _EXCEPTION_POINTERS* e);
108 };
109
110 /*
111 * Crash protection for the watcher thread. Wrap the callback
112 * with a __try { call() }
113 * To be able to use this - don't take locks, don't rely on destructors,
114 * don't make OS library calls, don't allocate memory, don't print,
115 * don't call code that could leave the heap / memory in an inconsistent state,
116 * or anything else where we are not in control if we suddenly jump out.
117 */
118 class WatcherThreadCrashProtection : public StackObj {
119 public:
120 WatcherThreadCrashProtection();
121 bool call(os::CrashProtectionCallback& cb);
122 };
123
124 class PlatformEvent : public CHeapObj<mtInternal> {
|