mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
6716785: implicit null checks not triggering with CompressedOops
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
This commit is contained in:
parent
575988272e
commit
20dba03e99
23 changed files with 197 additions and 133 deletions
|
@ -193,7 +193,11 @@ class os: AllStatic {
|
|||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue