src/share/vm/memory/allocation.inline.hpp
Print this page
*** 144,157 ****
_addr = os::reserve_memory(_size, NULL, alignment, F);
if (_addr == NULL) {
vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (reserve)");
}
! bool success = os::commit_memory(_addr, _size, false /* executable */);
! if (!success) {
! vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (commit)");
! }
return (E*)_addr;
}
template<class E, MEMFLAGS F>
--- 144,154 ----
_addr = os::reserve_memory(_size, NULL, alignment, F);
if (_addr == NULL) {
vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (reserve)");
}
! os::commit_memory_or_exit(_addr, _size, !ExecMem, "Allocator (commit)");
return (E*)_addr;
}
template<class E, MEMFLAGS F>