RFR: 8354954: Typed static memory for late initialization of static class members in Hotspot [v3]
Johan Sjölen
jsjolen at openjdk.org
Thu Apr 17 18:27:42 UTC 2025
On Thu, 17 Apr 2025 17:26:13 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> > ... however when working with certain code you may want to allocate before NMT is initialized. This leads to you having to use raw malloc. This is probably something you find out after having used os::malloc and already had a strange crash when building your code.
>
> ? No, this should not happen. You can, of course, use `os::malloc` before NMT is initialized; that is why NMT preinit mode exists. If you get strange crashes (do you have JBS issues for them?), those are bugs and should be fixed.
>
> If this is the only motivation for this PR, we may be able to save a lot of time.
You're right, I managed to confuse this with another bug I had, where I mmapped before the VMT was intialized. Sloppy of me.
Happy Easter, let's talk more later.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24689#issuecomment-2813725699
More information about the hotspot-dev
mailing list