diff src/share/vm/prims/whitebox.cpp @ 10969:a837fa3d3f86

8013057: assert(_needs_gc || SafepointSynchronize::is_at_safepoint()) failed: only read at safepoint Summary: Detect mmap() commit failures in Linux and Solaris os::commit_memory() impls and call vm_exit_out_of_memory(). Add os::commit_memory_or_exit(). Also tidy up some NMT accounting and some mmap() return value checking. Reviewed-by: zgu, stefank, dholmes, dsamersoff
author dcubed
date Thu, 13 Jun 2013 11:16:38 -0700
parents f54c85acc043
children f99558245e5c
line wrap: on
line diff
--- a/src/share/vm/prims/whitebox.cpp	Mon Jun 10 11:30:51 2013 +0200
+++ b/src/share/vm/prims/whitebox.cpp	Thu Jun 13 11:16:38 2013 -0700
@@ -159,7 +159,7 @@
 
 
 WB_ENTRY(void, WB_NMTCommitMemory(JNIEnv* env, jobject o, jlong addr, jlong size))
-  os::commit_memory((char *)(uintptr_t)addr, size);
+  os::commit_memory((char *)(uintptr_t)addr, size, !ExecMem);
   MemTracker::record_virtual_memory_type((address)(uintptr_t)addr, mtTest);
 WB_END