changeset 7926:ef6b27d844cc

8058715: stability issues when being launched as an embedded JVM via JNI Summary: Use mmap call without MAP_FIXED so we avoid corrupting already allocated memory Reviewed-by: coleenp, dsimms
author dbuck
date Thu, 06 Nov 2014 02:34:01 -0800
parents 3c87c13918fb
children 0d754e6851d3
files src/os_cpu/linux_x86/vm/os_linux_x86.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Thu Oct 30 13:03:30 2014 +0100
+++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Thu Nov 06 02:34:01 2014 -0800
@@ -909,7 +909,7 @@
    */
   char* hint = (char*) (Linux::initial_thread_stack_bottom() -
                         ((StackYellowPages + StackRedPages + 1) * page_size));
-  char* codebuf = os::reserve_memory(page_size, hint);
+  char* codebuf = os::attempt_reserve_memory_at(page_size, hint);
   if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) {
     return; // No matter, we tried, best effort.
   }