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:
Coleen Phillimore 2008-07-19 17:38:22 -04:00
parent 575988272e
commit 20dba03e99
23 changed files with 197 additions and 133 deletions

View file

@ -2173,8 +2173,7 @@ static char* get_bad_address() {
size_t size = os::vm_allocation_granularity();
bad_address = os::reserve_memory(size);
if (bad_address != NULL) {
os::commit_memory(bad_address, size);
os::protect_memory(bad_address, size);
os::protect_memory(bad_address, size, os::MEM_PROT_READ);
}
}
return bad_address;