Mercurial > hg > truffle
comparison src/share/vm/runtime/os.cpp @ 477:24fda36852ce
6727377: VM stack guard pages on Windows should PAGE_READWRITE not PAGE_EXECUTE_READWRITE
Summary: Make reguard_stack change access to RW, not execute and use os::protect_memory with the new parameter when change needed to X.
Reviewed-by: acorn, jcoomes
author | coleenp |
---|---|
date | Wed, 10 Dec 2008 15:14:29 -0800 |
parents | d95b224e9f17 |
children | 773234c55e8c |
comparison
equal
deleted
inserted
replaced
473:3ad2b8576c4a | 477:24fda36852ce |
---|---|
930 // scheduler starvation problem etc. To avoid the long synchronization | 930 // scheduler starvation problem etc. To avoid the long synchronization |
931 // time and expensive page trap spinning, 'SerializePageLock' is used to block | 931 // time and expensive page trap spinning, 'SerializePageLock' is used to block |
932 // the mutator thread if such case is encountered. See bug 6546278 for details. | 932 // the mutator thread if such case is encountered. See bug 6546278 for details. |
933 Thread::muxAcquire(&SerializePageLock, "serialize_thread_states"); | 933 Thread::muxAcquire(&SerializePageLock, "serialize_thread_states"); |
934 os::protect_memory((char *)os::get_memory_serialize_page(), | 934 os::protect_memory((char *)os::get_memory_serialize_page(), |
935 os::vm_page_size(), MEM_PROT_READ, /*is_committed*/true ); | 935 os::vm_page_size(), MEM_PROT_READ); |
936 os::unguard_memory((char *)os::get_memory_serialize_page(), os::vm_page_size()); | 936 os::protect_memory((char *)os::get_memory_serialize_page(), |
937 os::vm_page_size(), MEM_PROT_RW); | |
937 Thread::muxRelease(&SerializePageLock); | 938 Thread::muxRelease(&SerializePageLock); |
938 } | 939 } |
939 | 940 |
940 // Returns true if the current stack pointer is above the stack shadow | 941 // Returns true if the current stack pointer is above the stack shadow |
941 // pages, false otherwise. | 942 // pages, false otherwise. |