Unsafe (and Java 9/10) (RU)
summary
Shows what sun.misc.Unsafe actually does: arbitrary memory reads/writes, allocate/free off-heap, and corrupt objects by writing at offsets — a simple offset write turns a 42 into 1000 or crashes the JVM. Demonstrates real uses: faster CAS/atomic ops, custom allocators for huge arrays and mmaped I/O, and Disruptor-style 6M/sec pipelines. Explains that Java 9+ wraps or hides Unsafe behind modules, that some functionality gets public replacements while other bits may be deprecated or removed by Java 10, and the ecosystem cost of rewriting popular libs.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:08What is Unsafe and why
- 7:58Unsafe in action
- 13:34Dangers of Unsafe
- 16:26Native access and JNI
- 20:06Memory allocation and hashcode issues
- 24:27Java 9 and Unsafe's fate
- 33:50Oracle's solution and future
- 40:30JVM optimizations and entry points
- 44:40Conclusion and Q&A
related talks
18mThe Secret History and Tragic Fate of sun.misc.Unsafe
50mSafely Shoot Yourself in the Foot with Java 9
49mA Post Apocalyptic sun misc Unsafe World
48mSafely Shoot Yourself in the Foot with Java 9
39mSafety first
51mJava - Integrity by Default
44mEngineering a Modern Java Platform
42mJava 9 - What are we going to love/hate this time
