Mercurial > hg > graal-compiler
comparison src/os/solaris/vm/os_solaris.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 | 85f1b9537f70 |
children | 8a25d96bcf08 |
comparison
equal
deleted
inserted
replaced
473:3ad2b8576c4a | 477:24fda36852ce |
---|---|
3024 return retVal == 0; | 3024 return retVal == 0; |
3025 } | 3025 } |
3026 | 3026 |
3027 // Protect memory (Used to pass readonly pages through | 3027 // Protect memory (Used to pass readonly pages through |
3028 // JNI GetArray<type>Elements with empty arrays.) | 3028 // JNI GetArray<type>Elements with empty arrays.) |
3029 // Also, used for serialization page and for compressed oops null pointer | |
3030 // checking. | |
3029 bool os::protect_memory(char* addr, size_t bytes, ProtType prot, | 3031 bool os::protect_memory(char* addr, size_t bytes, ProtType prot, |
3030 bool is_committed) { | 3032 bool is_committed) { |
3031 unsigned int p = 0; | 3033 unsigned int p = 0; |
3032 switch (prot) { | 3034 switch (prot) { |
3033 case MEM_PROT_NONE: p = PROT_NONE; break; | 3035 case MEM_PROT_NONE: p = PROT_NONE; break; |
3047 bool os::guard_memory(char* addr, size_t bytes) { | 3049 bool os::guard_memory(char* addr, size_t bytes) { |
3048 return solaris_mprotect(addr, bytes, PROT_NONE); | 3050 return solaris_mprotect(addr, bytes, PROT_NONE); |
3049 } | 3051 } |
3050 | 3052 |
3051 bool os::unguard_memory(char* addr, size_t bytes) { | 3053 bool os::unguard_memory(char* addr, size_t bytes) { |
3052 return solaris_mprotect(addr, bytes, PROT_READ|PROT_WRITE|PROT_EXEC); | 3054 return solaris_mprotect(addr, bytes, PROT_READ|PROT_WRITE); |
3053 } | 3055 } |
3054 | 3056 |
3055 // Large page support | 3057 // Large page support |
3056 | 3058 |
3057 // UseLargePages is the master flag to enable/disable large page memory. | 3059 // UseLargePages is the master flag to enable/disable large page memory. |