Mercurial > hg > graal-compiler
comparison src/os/windows/vm/os_windows.inline.hpp @ 0:a61af66fc99e jdk7-b24
Initial load
author | duke |
---|---|
date | Sat, 01 Dec 2007 00:00:00 +0000 |
parents | |
children | fcbfc50865ab |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a61af66fc99e |
---|---|
1 /* | |
2 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. | |
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 * | |
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
20 * CA 95054 USA or visit www.sun.com if you need additional information or | |
21 * have any questions. | |
22 * | |
23 */ | |
24 | |
25 inline const char* os::file_separator() { return "\\"; } | |
26 inline const char* os::line_separator() { return "\r\n"; } | |
27 inline const char* os::path_separator() { return ";"; } | |
28 | |
29 inline const char* os::jlong_format_specifier() { return "%I64d"; } | |
30 inline const char* os::julong_format_specifier() { return "%I64u"; } | |
31 | |
32 // File names are case-insensitive on windows only | |
33 inline int os::file_name_strcmp(const char* s, const char* t) { | |
34 return _stricmp(s, t); | |
35 } | |
36 | |
37 // Used to improve time-sharing on some systems | |
38 inline void os::loop_breaker(int attempts) {} | |
39 | |
40 inline bool os::obsolete_option(const JavaVMOption *option) { | |
41 return false; | |
42 } | |
43 | |
44 inline bool os::uses_stack_guard_pages() { | |
45 return os::win32::is_nt(); | |
46 } | |
47 | |
48 inline bool os::allocate_stack_guard_pages() { | |
49 assert(uses_stack_guard_pages(), "sanity check"); | |
50 return true; | |
51 } | |
52 | |
53 inline int os::readdir_buf_size(const char *path) | |
54 { | |
55 /* As Windows doesn't use the directory entry buffer passed to | |
56 os::readdir() this can be as short as possible */ | |
57 | |
58 return 1; | |
59 } | |
60 | |
61 // Bang the shadow pages if they need to be touched to be mapped. | |
62 inline void os::bang_stack_shadow_pages() { | |
63 // Write to each page of our new frame to force OS mapping. | |
64 // If we decrement stack pointer more than one page | |
65 // the OS may not map an intervening page into our space | |
66 // and may fault on a memory access to interior of our frame. | |
67 address sp = current_stack_pointer(); | |
68 for (int pages = 1; pages <= StackShadowPages; pages++) { | |
69 *((int *)(sp - (pages * vm_page_size()))) = 0; | |
70 } | |
71 } |