Mercurial > hg > truffle
diff src/share/vm/runtime/os.hpp @ 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 |
line wrap: on
line diff
--- a/src/share/vm/runtime/os.hpp Fri Jul 11 01:14:44 2008 -0700 +++ b/src/share/vm/runtime/os.hpp Sat Jul 19 17:38:22 2008 -0400 @@ -193,7 +193,11 @@ static bool commit_memory(char* addr, size_t size, size_t alignment_hint); static bool uncommit_memory(char* addr, size_t bytes); static bool release_memory(char* addr, size_t bytes); - static bool protect_memory(char* addr, size_t bytes); + + enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX }; + static bool protect_memory(char* addr, size_t bytes, ProtType prot, + bool is_committed = false); + static bool guard_memory(char* addr, size_t bytes); static bool unguard_memory(char* addr, size_t bytes); static char* map_memory(int fd, const char* file_name, size_t file_offset,