相關主題
商品描述
This book explains how the Z Garbage Collector was designed, why it was designed this way, the common pitfalls to avoid when using ZGC in JDK 25 and how to get useful information from the garbage collector.
Java is one of the most widely used programming languages in the world. It is a memory-safe language that completely relies on a good garbage collection (GC) algorithm to work well. The Z Garbage Collector of OpenJDK is arguably the most sophisticated production GC algorithm for any managed language runtime. The book goes into detail and covers core algorithm concepts of ZGC: coloured pointers, GC barriers, concurrent marking, concurrent relocation, concurrent stack scanning, concurrent root scanning, concurrent class unloading, concurrent generational collection, as well as showing how all of this works. It explains how the JVM evolved certain features to be able to accommodate ZGC, and covers the importance of each of the various GC heuristics and how they function.
With a unique angle right between academia and industry, this book is useful for computer science students and Java developers alike.
商品描述(中文翻譯)
這本書解釋了 Z 垃圾收集器的設計方式、為什麼以這種方式設計、在使用 JDK 25 的 ZGC 時需要避免的常見陷阱,以及如何從垃圾收集器獲取有用的信息。
Java 是世界上最廣泛使用的程式語言之一。它是一種內存安全的語言,完全依賴良好的垃圾收集 (GC) 演算法來正常運作。OpenJDK 的 Z 垃圾收集器可以說是任何受管理語言運行時中最複雜的生產級 GC 演算法。這本書詳細介紹了 ZGC 的核心演算法概念:彩色指針、GC 障礙、並行標記、並行重定位、並行堆疊掃描、並行根掃描、並行類卸載、並行世代收集,以及展示這些如何運作。它解釋了 JVM 如何演變某些特性以適應 ZGC,並涵蓋了各種 GC 啟發式的每一項重要性及其運作方式。
這本書以學術界與產業之間的獨特視角,對計算機科學學生和 Java 開發者都非常有用。
作者簡介
Erik Österlund did his BSc, MSc and PhD at the Linnaeus University, Sweden, where his interests and thesis work were all focused on garbage collection. At a memory management conference in Beijing 2012, Erik met Jesper Wilhelmsson from an Oracle development office in Stockholm. They were both surprised to find two Swedes in Beijing, interested in memory management. One thing led to another, and a research internship was arranged. There, Erik was talking about how a concurrent GC algorithm was needed. In 2016, Erik joined Oracle and started working on ZGC, and has been one of the core ZGC developers ever since.
作者簡介(中文翻譯)
Erik Österlund 在瑞典的林奈大學完成了他的學士、碩士和博士學位,他的興趣和論文工作都集中在垃圾回收上。在2012年於北京舉行的記憶體管理會議上,Erik 遇到了來自斯德哥爾摩 Oracle 開發辦公室的 Jesper Wilhelmsson。他們都驚訝地發現,在北京有兩位瑞典人對記憶體管理感興趣。事情發展下去,安排了一個研究實習。在那裡,Erik 談到了需要一種並行的 GC 演算法。2016年,Erik 加入了 Oracle,開始從事 ZGC 的工作,並且從那時起一直是 ZGC 的核心開發者之一。