Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/os.cpp @ 237:1fdb98a17101
6716785: implicit null checks not triggering with CompressedOops
Summary: allocate alignment-sized page(s) below java heap so that memory accesses at heap_base+1page give signal and cause an implicit null check
Reviewed-by: kvn, jmasa, phh, jcoomes
author | coleenp |
---|---|
date | Sat, 19 Jul 2008 17:38:22 -0400 |
parents | d1605aabd0a1 |
children | d95b224e9f17 |
comparison
equal
deleted
inserted
replaced
235:9c2ecc2ffb12 | 237:1fdb98a17101 |
---|---|
920 // permission restoration is observed to be much longer than expected due to | 920 // permission restoration is observed to be much longer than expected due to |
921 // scheduler starvation problem etc. To avoid the long synchronization | 921 // scheduler starvation problem etc. To avoid the long synchronization |
922 // time and expensive page trap spinning, 'SerializePageLock' is used to block | 922 // time and expensive page trap spinning, 'SerializePageLock' is used to block |
923 // the mutator thread if such case is encountered. See bug 6546278 for details. | 923 // the mutator thread if such case is encountered. See bug 6546278 for details. |
924 Thread::muxAcquire(&SerializePageLock, "serialize_thread_states"); | 924 Thread::muxAcquire(&SerializePageLock, "serialize_thread_states"); |
925 os::protect_memory( (char *)os::get_memory_serialize_page(), os::vm_page_size() ); | 925 os::protect_memory((char *)os::get_memory_serialize_page(), |
926 os::unguard_memory( (char *)os::get_memory_serialize_page(), os::vm_page_size() ); | 926 os::vm_page_size(), MEM_PROT_READ, /*is_committed*/true ); |
927 os::unguard_memory((char *)os::get_memory_serialize_page(), os::vm_page_size()); | |
927 Thread::muxRelease(&SerializePageLock); | 928 Thread::muxRelease(&SerializePageLock); |
928 } | 929 } |
929 | 930 |
930 // Returns true if the current stack pointer is above the stack shadow | 931 // Returns true if the current stack pointer is above the stack shadow |
931 // pages, false otherwise. | 932 // pages, false otherwise. |