[Hacking the JVM] The Hidden Cost of Thread Creation

Abstract Thread creation in Java is often cited as a heavyweight operation, but what makes it costly? This post explores the complete journey of thread creation—from calling `Thread.start()` in Java code through JNI boundaries, into JVM internals (jvm.cpp, thread.cpp), and finally to OS-level pthread creation on Linux. We examine stack allocation, guard pages, TLS adjustments, […]

Continue reading