RFR (S): 6516521: Doc: should document about the primordial thread attaching to the VM
David Holmes
david.holmes at oracle.com
Thu Oct 11 09:45:19 UTC 2018
Although the JNI spec itself is not an open document I see no reason not
to get feedback on this simple update.
Bug: https://bugs.openjdk.java.net/browse/JDK-6516521
---
Chapter 5: The Invocation API
Creating the VM
The JNI_CreateJavaVM() function loads and initializes a Java VM and
returns a pointer to the JNI interface pointer. The thread that called
JNI_CreateJavaVM() is considered to be the main thread.
---
Proposed additional text:
*Note:* Depending on the operating system, the primordial process thread
may be subject to special handling that impacts its ability to function
properly as a normal Java thread (such as having a limited stack size
and being able to throw `StackOverflowError`). It is strongly
recommended that the primordial thread is not used to load the Java VM,
but that a new thread is created just for that purpose.
Thanks,
David
More information about the hotspot-runtime-dev
mailing list