equal
deleted
inserted
replaced
176 // |
176 // |
177 public static long maxDirectMemory() { |
177 public static long maxDirectMemory() { |
178 return directMemory; |
178 return directMemory; |
179 } |
179 } |
180 |
180 |
|
181 // User-controllable flag that determines if direct buffers should be page |
|
182 // aligned. The "-XX:+PageAlignDirectMemory" option can be used to force |
|
183 // buffers, allocated by ByteBuffer.allocateDirect, to be page aligned. |
|
184 private static boolean pageAlignDirectMemory; |
|
185 |
|
186 // Returns {@code true} if the direct buffers should be page aligned. This |
|
187 // variable is initialized by saveAndRemoveProperties. |
|
188 public static boolean isDirectMemoryPageAligned() { |
|
189 return pageAlignDirectMemory; |
|
190 } |
|
191 |
181 // A user-settable boolean to determine whether ClassLoader.loadClass should |
192 // A user-settable boolean to determine whether ClassLoader.loadClass should |
182 // accept array syntax. This value may be changed during VM initialization |
193 // accept array syntax. This value may be changed during VM initialization |
183 // via the system property "sun.lang.ClassLoader.allowArraySyntax". |
194 // via the system property "sun.lang.ClassLoader.allowArraySyntax". |
184 // |
195 // |
185 // The default for 1.5 is "true", array syntax is allowed. In 1.6, the |
196 // The default for 1.5 is "true", array syntax is allowed. In 1.6, the |
249 long l = Long.parseLong(s); |
260 long l = Long.parseLong(s); |
250 if (l > -1) |
261 if (l > -1) |
251 directMemory = l; |
262 directMemory = l; |
252 } |
263 } |
253 } |
264 } |
|
265 |
|
266 // Check if direct buffers should be page aligned |
|
267 s = (String)props.remove("sun.nio.PageAlignDirectMemory"); |
|
268 if ("true".equals(s)) |
|
269 pageAlignDirectMemory = true; |
254 |
270 |
255 // Set a boolean to determine whether ClassLoader.loadClass accepts |
271 // Set a boolean to determine whether ClassLoader.loadClass accepts |
256 // array syntax. This value is controlled by the system property |
272 // array syntax. This value is controlled by the system property |
257 // "sun.lang.ClassLoader.allowArraySyntax". |
273 // "sun.lang.ClassLoader.allowArraySyntax". |
258 s = props.getProperty("sun.lang.ClassLoader.allowArraySyntax"); |
274 s = props.getProperty("sun.lang.ClassLoader.allowArraySyntax"); |