changeset 5444:4800ce2a2849

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 04:57:28 -0800
parents 9d2b485d2a58
children 94f796f95cbc
files src/os_cpu/linux_x86/vm/os_linux_x86.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Wed Nov 05 06:13:26 2014 -0800
+++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Thu Nov 06 04:57:28 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -899,7 +899,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::pd_attempt_reserve_memory_at(page_size, hint);
   if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) {
     return; // No matter, we tried, best effort.
   }