author | zgu |
Fri, 15 Apr 2011 09:34:43 -0400 | |
changeset 10246 | adee0cf4c981 |
parent 8119 | 81eef1b06988 |
child 10494 | 3f347ed8bd3c |
permissions | -rw-r--r-- |
1 | 1 |
/* |
8119
81eef1b06988
7014918: Improve core/minidump handling in Hotspot
ctornqvi
parents:
7397
diff
changeset
|
2 |
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1623
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1623
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1623
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#ifndef OS_WINDOWS_VM_OS_WINDOWS_HPP |
26 |
#define OS_WINDOWS_VM_OS_WINDOWS_HPP |
|
1 | 27 |
// Win32_OS defines the interface to windows operating systems |
28 |
||
29 |
class win32 { |
|
30 |
||
31 |
protected: |
|
32 |
static int _vm_page_size; |
|
33 |
static int _vm_allocation_granularity; |
|
34 |
static int _processor_type; |
|
35 |
static int _processor_level; |
|
36 |
static julong _physical_memory; |
|
37 |
static size_t _default_stack_size; |
|
38 |
static bool _is_nt; |
|
1421
a7ef1a3b2644
6660681: Incrementally reserve pages on win server 2003 for better large page affinity
jmasa
parents:
1
diff
changeset
|
39 |
static bool _is_windows_2003; |
8119
81eef1b06988
7014918: Improve core/minidump handling in Hotspot
ctornqvi
parents:
7397
diff
changeset
|
40 |
static bool _is_windows_server; |
1 | 41 |
|
42 |
public: |
|
43 |
// Windows-specific interface: |
|
44 |
static void initialize_system_info(); |
|
45 |
static void setmode_streams(); |
|
46 |
||
47 |
// Processor info as provided by NT |
|
48 |
static int processor_type() { return _processor_type; } |
|
49 |
// Processor level may not be accurate on non-NT systems |
|
50 |
static int processor_level() { |
|
51 |
assert(is_nt(), "use vm_version instead"); |
|
52 |
return _processor_level; |
|
53 |
} |
|
54 |
static julong available_memory(); |
|
55 |
static julong physical_memory() { return _physical_memory; } |
|
56 |
||
10246
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
57 |
// load dll from Windows system directory or Windows directory |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
58 |
static HINSTANCE load_Windows_dll(const char* name, char *ebuf, int ebuflen); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
59 |
|
1 | 60 |
public: |
61 |
// Generic interface: |
|
62 |
||
63 |
// Trace number of created threads |
|
64 |
static intx _os_thread_limit; |
|
65 |
static volatile intx _os_thread_count; |
|
66 |
||
67 |
// Tells whether the platform is NT or Windown95 |
|
68 |
static bool is_nt() { return _is_nt; } |
|
69 |
||
8119
81eef1b06988
7014918: Improve core/minidump handling in Hotspot
ctornqvi
parents:
7397
diff
changeset
|
70 |
// Tells whether this is a server version of Windows |
81eef1b06988
7014918: Improve core/minidump handling in Hotspot
ctornqvi
parents:
7397
diff
changeset
|
71 |
static bool is_windows_server() { return _is_windows_server; } |
81eef1b06988
7014918: Improve core/minidump handling in Hotspot
ctornqvi
parents:
7397
diff
changeset
|
72 |
|
1421
a7ef1a3b2644
6660681: Incrementally reserve pages on win server 2003 for better large page affinity
jmasa
parents:
1
diff
changeset
|
73 |
// Tells whether the platform is Windows 2003 |
a7ef1a3b2644
6660681: Incrementally reserve pages on win server 2003 for better large page affinity
jmasa
parents:
1
diff
changeset
|
74 |
static bool is_windows_2003() { return _is_windows_2003; } |
a7ef1a3b2644
6660681: Incrementally reserve pages on win server 2003 for better large page affinity
jmasa
parents:
1
diff
changeset
|
75 |
|
1 | 76 |
// Returns the byte size of a virtual memory page |
77 |
static int vm_page_size() { return _vm_page_size; } |
|
78 |
||
79 |
// Returns the size in bytes of memory blocks which can be allocated. |
|
80 |
static int vm_allocation_granularity() { return _vm_allocation_granularity; } |
|
81 |
||
82 |
// Read the headers for the executable that started the current process into |
|
83 |
// the structure passed in (see winnt.h). |
|
84 |
static void read_executable_headers(PIMAGE_NT_HEADERS); |
|
85 |
||
86 |
// Default stack size for the current process. |
|
87 |
static size_t default_stack_size() { return _default_stack_size; } |
|
88 |
||
89 |
#ifndef _WIN64 |
|
90 |
// A wrapper to install a structured exception handler for fast JNI accesors. |
|
91 |
static address fast_jni_accessor_wrapper(BasicType); |
|
92 |
#endif |
|
93 |
||
94 |
// filter function to ignore faults on serializations page |
|
95 |
static LONG WINAPI serialize_fault_filter(struct _EXCEPTION_POINTERS* e); |
|
96 |
}; |
|
97 |
||
98 |
class PlatformEvent : public CHeapObj { |
|
99 |
private: |
|
100 |
double CachePad [4] ; // increase odds that _Event is sole occupant of cache line |
|
101 |
volatile int _Event ; |
|
102 |
HANDLE _ParkHandle ; |
|
103 |
||
104 |
public: // TODO-FIXME: make dtor private |
|
105 |
~PlatformEvent() { guarantee (0, "invariant") ; } |
|
106 |
||
107 |
public: |
|
108 |
PlatformEvent() { |
|
109 |
_Event = 0 ; |
|
110 |
_ParkHandle = CreateEvent (NULL, false, false, NULL) ; |
|
111 |
guarantee (_ParkHandle != NULL, "invariant") ; |
|
112 |
} |
|
113 |
||
114 |
// Exercise caution using reset() and fired() - they may require MEMBARs |
|
115 |
void reset() { _Event = 0 ; } |
|
116 |
int fired() { return _Event; } |
|
117 |
void park () ; |
|
118 |
void unpark () ; |
|
119 |
int park (jlong millis) ; |
|
120 |
} ; |
|
121 |
||
122 |
||
123 |
||
124 |
class PlatformParker : public CHeapObj { |
|
125 |
protected: |
|
126 |
HANDLE _ParkEvent ; |
|
127 |
||
128 |
public: |
|
129 |
~PlatformParker () { guarantee (0, "invariant") ; } |
|
130 |
PlatformParker () { |
|
131 |
_ParkEvent = CreateEvent (NULL, true, false, NULL) ; |
|
132 |
guarantee (_ParkEvent != NULL, "invariant") ; |
|
133 |
} |
|
134 |
||
135 |
} ; |
|
7397 | 136 |
|
10246
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
137 |
// JDK7 requires VS2010 |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
138 |
#if _MSC_VER < 1600 |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
139 |
#define JDK6_OR_EARLIER 1 |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
140 |
#endif |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
141 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
142 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
143 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
144 |
class WinSock2Dll: AllStatic { |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
145 |
public: |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
146 |
static BOOL WSAStartup(WORD, LPWSADATA); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
147 |
static struct hostent* gethostbyname(const char *name); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
148 |
static BOOL WinSock2Available(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
149 |
#ifdef JDK6_OR_EARLIER |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
150 |
private: |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
151 |
static int (PASCAL FAR* _WSAStartup)(WORD, LPWSADATA); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
152 |
static struct hostent *(PASCAL FAR *_gethostbyname)(...); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
153 |
static BOOL initialized; |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
154 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
155 |
static void initialize(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
156 |
#endif |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
157 |
}; |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
158 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
159 |
class Kernel32Dll: AllStatic { |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
160 |
public: |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
161 |
static BOOL SwitchToThread(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
162 |
static SIZE_T GetLargePageMinimum(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
163 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
164 |
static BOOL SwitchToThreadAvailable(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
165 |
static BOOL GetLargePageMinimumAvailable(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
166 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
167 |
// Help tools |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
168 |
static BOOL HelpToolsAvailable(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
169 |
static HANDLE CreateToolhelp32Snapshot(DWORD,DWORD); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
170 |
static BOOL Module32First(HANDLE,LPMODULEENTRY32); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
171 |
static BOOL Module32Next(HANDLE,LPMODULEENTRY32); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
172 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
173 |
static BOOL GetNativeSystemInfoAvailable(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
174 |
static void GetNativeSystemInfo(LPSYSTEM_INFO); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
175 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
176 |
private: |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
177 |
// GetLargePageMinimum available on Windows Vista/Windows Server 2003 |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
178 |
// and later |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
179 |
static SIZE_T (WINAPI *_GetLargePageMinimum)(void); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
180 |
static BOOL initialized; |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
181 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
182 |
static void initialize(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
183 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
184 |
#ifdef JDK6_OR_EARLIER |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
185 |
private: |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
186 |
static BOOL (WINAPI *_SwitchToThread)(void); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
187 |
static HANDLE (WINAPI* _CreateToolhelp32Snapshot)(DWORD,DWORD); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
188 |
static BOOL (WINAPI* _Module32First)(HANDLE,LPMODULEENTRY32); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
189 |
static BOOL (WINAPI* _Module32Next)(HANDLE,LPMODULEENTRY32); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
190 |
static void (WINAPI *_GetNativeSystemInfo)(LPSYSTEM_INFO); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
191 |
#endif |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
192 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
193 |
}; |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
194 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
195 |
class Advapi32Dll: AllStatic { |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
196 |
public: |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
197 |
static BOOL AdjustTokenPrivileges(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
198 |
static BOOL OpenProcessToken(HANDLE, DWORD, PHANDLE); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
199 |
static BOOL LookupPrivilegeValue(LPCTSTR, LPCTSTR, PLUID); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
200 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
201 |
static BOOL AdvapiAvailable(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
202 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
203 |
#ifdef JDK6_OR_EARLIER |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
204 |
private: |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
205 |
static BOOL (WINAPI *_AdjustTokenPrivileges)(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
206 |
static BOOL (WINAPI *_OpenProcessToken)(HANDLE, DWORD, PHANDLE); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
207 |
static BOOL (WINAPI *_LookupPrivilegeValue)(LPCTSTR, LPCTSTR, PLUID); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
208 |
static BOOL initialized; |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
209 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
210 |
static void initialize(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
211 |
#endif |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
212 |
}; |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
213 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
214 |
class PSApiDll: AllStatic { |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
215 |
public: |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
216 |
static BOOL EnumProcessModules(HANDLE, HMODULE *, DWORD, LPDWORD); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
217 |
static DWORD GetModuleFileNameEx(HANDLE, HMODULE, LPTSTR, DWORD); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
218 |
static BOOL GetModuleInformation(HANDLE, HMODULE, LPMODULEINFO, DWORD); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
219 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
220 |
static BOOL PSApiAvailable(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
221 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
222 |
#ifdef JDK6_OR_EARLIER |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
223 |
private: |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
224 |
static BOOL (WINAPI *_EnumProcessModules)(HANDLE, HMODULE *, DWORD, LPDWORD); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
225 |
static BOOL (WINAPI *_GetModuleFileNameEx)(HANDLE, HMODULE, LPTSTR, DWORD);; |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
226 |
static BOOL (WINAPI *_GetModuleInformation)(HANDLE, HMODULE, LPMODULEINFO, DWORD); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
227 |
static BOOL initialized; |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
228 |
|
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
229 |
static void initialize(); |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
230 |
#endif |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
231 |
}; |
adee0cf4c981
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
zgu
parents:
8119
diff
changeset
|
232 |
|
7397 | 233 |
#endif // OS_WINDOWS_VM_OS_WINDOWS_HPP |