JDK 9 is out! But as a library writer, this means change, and change can go either way... Once we've satisfied that JCTools works with JDK9, what other observations can we make? Well, one of the main motivations for using JCTools is performance, and since the code has been predominantly tested and run with JDK8, is it even better with JDK9? is it worse?| Psychosomatic, Lobotomy, Saw
I've just run into this issue this week, and it's very cute, so this here is a summary. Akka has their own MPSC linked queue implementation, and this week in was suggested they'd swap to using JCTools. The context in which the suggestion was made was a recently closed bug with the mystery title: AbstractNodeQueue suffers from nepotism| Psychosomatic, Lobotomy, Saw
本文永久链接 – https://tonybai.com/2025/10/15/go-archaeology-defer 大家好,我是Tony Bai。 在 Go 语言的所有关键字中,defer 无疑是最具特色和争议的之一。它以一种近乎“魔法”的方式,保证了资源清理逻辑的执行,极大地提升了代码的可读性和健壮性。f, _ := os.Open(“…”); defer f.Close() 这一行代码,几乎是所有 Gopher 的肌肉记忆。 然而,在这份优雅的背后,曾几何时,defer 却背负着...| Tony Bai
What are GC barriers and how do they relate to ahead-of-time compilation? This blog post explores the intersection of HotSpot's GCs and compilers through the lense of implementing GC-agnostic load barriers at the assembly level, and gives key insigh…| inside.java
Have you ever wondered what happens with the variables you define in your Golang (Go) programs? Do they exist forever, or are they recycled at some point? Where do they live in memory and how are they managed?| blog.allegro.tech
本文永久链接 - https://tonybai.com/2025/07/22/cedardb-choose-cpp-rather-than-rust 大家好,我是Tony Bai。 近年来,Rust 语言无疑是技术圈最炙手可热的明星。它以“内存安全”的核心承诺,向统治了系统编程领| tonybai.com
While working on a paper about allocation profiling in VMProf I got curious about how quickly the RPython GC can allocate an object. I wrote a small RPython benchmark program to get an idea of the order of magnitude. The basic idea is to just allocate an instance in a tight loop: classA(object):passdefrun(loops):# preliminary idea, see belowforiinrange(loops):a=A()a.i=i The RPython type inference will find out that instances of A have a single i field, which is an integer. In addition to that...| PyPy
Introduction There are many time-based statistical profilers around (like VMProf or py-spy just to name a few). They allow the user to pick a trade-off between profiling precision and runtime overhead| PyPy
本文永久链接 - https://tonybai.com/2025/05/15/go-json-v2 大家好,我是Tony Bai。 Go 语言标准库中的 encoding/json 包,无疑是我们日常开发中使用频率最高的包之一。它为 Go 社区服务了十多年,几乎无处不在| tonybai.com
Yesterday I had a long overdue catchup with a good friend. At one point the conversation drifted to the question, do we really learn from our failures? While conventional wisdom tells us that we learn more from our failures than from our successes, science tells us quite the opposite. Science also tells us that we learn just as much from the failures of others as we do from others success. How did we get to this topic in our conversation? It’s because we’ve both reached a point in our car...| Random Notes and Cheat Sheets
As mentioned in my previous posting on Unified Logging (UL), messages will be associated with both a level and a tag set. The levels are trace, debug, info, warning, and error. Tags can be listed by running java -Xlog:help. The output from JDK 17 is listed here. add, age, alloc, annotation, arguments, attach, barrier, biasedlocking, blocks, bot, breakpoint, bytecode, cds, census, class, classhisto, cleanup, codecache, compaction, compilation, condy, constantpool, constraints, container, coops...| Random Notes and Cheat Sheets
Unified Logging was introduced in JDK 9. It’s purpose was to offer JVM developers an API and component that was similar to the logging frameworks used by Java developers. My main interest in Unified Logging (UL) is rooted in my need for information about how the garbage collection is behaving. It is this information that allows me to understand how to tune the garbage collector. Prior to UL, the flags of choice were as follows. -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintTenuringDistrib...| Random Notes and Cheat Sheets
Introduction There are many time-based statistical profilers around (like VMProf or py-spy just to name a few). They allow the user to pick a trade-off between profiling precision and runtime overhead. On the other hand there are memory profilers such as memray. They can be handy for finding leaks or for discovering functions that allocate a lot of memory. Memory profilers typlically save every single allocation a program does. This results in precise profiling, but larger overhead. In this p...| PyPy
First part of a series of articles about writing a .NET Garbage Collector in C# using NativeAOT. This part sets the expectations and setups the project, dealing with the first difficulties.| minidump.net
open and Python TL;DR: Misusing Python’s open and the interaction of CPython’s GC and UNIX semantics can lead to unexpected results!| Javier Honduvilla Coto
After three years, I have decided to update my GC cheat sheet.| Alexey Ragozin
Automatic memory management (garbage collection) is one of essential aspects of Java platform. Garbage collection relieves developers from pain of memory management and protects them from whole range of memory related issues. Though, working with external resources (e.g. files and socket) from Java becomes tricky, because garbage collector alone is not enough to manage such resources.| Alexey Ragozin
Below are slide decks for open event held in Moscow Technology Center of Deutsche Bank.| Alexey Ragozin
Updated version is available!| Alexey Ragozin
If you’ve looked up online what ‘gender critical’ means, you may have come across a lot of material accusing such women of bigotry and comparing us to homophobes of old. You may h…| The Alcove