src/share/vm/memory/allocation.inline.hpp

changeset 5255
a837fa3d3f86
parent 5103
f9be75d21404
child 5614
9758d9f36299
equal deleted inserted replaced
5237:f2110083203d 5255:a837fa3d3f86
144 _addr = os::reserve_memory(_size, NULL, alignment, F); 144 _addr = os::reserve_memory(_size, NULL, alignment, F);
145 if (_addr == NULL) { 145 if (_addr == NULL) {
146 vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (reserve)"); 146 vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (reserve)");
147 } 147 }
148 148
149 bool success = os::commit_memory(_addr, _size, false /* executable */); 149 os::commit_memory_or_exit(_addr, _size, !ExecMem, "Allocator (commit)");
150 if (!success) {
151 vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (commit)");
152 }
153 150
154 return (E*)_addr; 151 return (E*)_addr;
155 } 152 }
156 153
157 template<class E, MEMFLAGS F> 154 template<class E, MEMFLAGS F>

mercurial