< prev index next >
src/os_cpu/linux_x86/vm/os_linux_x86.cpp
Print this page
rev 6871 : 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
@@ -907,11 +907,11 @@
* If we are embedded in an app other than launcher (initial != main stack),
* we don't have much control or understanding of the address space, just let it slide.
*/
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.
}
if (PrintMiscellaneous && (Verbose || WizardMode)) {
tty->print_cr("[CS limit NX emulation work-around, exec code at: %p]", codebuf);
< prev index next >