1 #ifdef USE_PRAGMA_IDENT_HDR
2 #pragma ident "@(#)os_windows.inline.hpp 1.44 07/05/05 17:04:43 JVM"
3 #endif
4 /*
5 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7 *
8 * This code is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 only, as
10 * published by the Free Software Foundation.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23 * CA 95054 USA or visit www.sun.com if you need additional information or
24 * have any questions.
25 *
55
56 inline int os::readdir_buf_size(const char *path)
57 {
58 /* As Windows doesn't use the directory entry buffer passed to
59 os::readdir() this can be as short as possible */
60
61 return 1;
62 }
63
64 // Bang the shadow pages if they need to be touched to be mapped.
65 inline void os::bang_stack_shadow_pages() {
66 // Write to each page of our new frame to force OS mapping.
67 // If we decrement stack pointer more than one page
68 // the OS may not map an intervening page into our space
69 // and may fault on a memory access to interior of our frame.
70 address sp = current_stack_pointer();
71 for (int pages = 1; pages <= StackShadowPages; pages++) {
72 *((int *)(sp - (pages * vm_page_size()))) = 0;
73 }
74 }
|
1 /*
2 * Copyright 1997-2008 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 *
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 }
72
73 inline bool os::numa_has_static_binding() { return true; }
74 inline bool os::numa_has_group_homing() { return false; }
|