hotspot/src/share/vm/memory/allocation.inline.hpp
changeset 18069 e6d4971c8650
parent 17376 4ee999c3c007
child 19696 bd5a0131bde1
--- a/hotspot/src/share/vm/memory/allocation.inline.hpp	Mon Jun 10 11:30:51 2013 +0200
+++ b/hotspot/src/share/vm/memory/allocation.inline.hpp	Thu Jun 13 11:16:38 2013 -0700
@@ -146,10 +146,7 @@
     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)");
-  }
+  os::commit_memory_or_exit(_addr, _size, !ExecMem, "Allocator (commit)");
 
   return (E*)_addr;
 }