Archives
All the articles I've archived.
-
Implementing Defer in C++
Implementing a Go-style defer mechanism in C++
-
Taming Time in Game Engines
A deep dive into fixed timesteps and floating point determinism.
-
Work-Stealing Deque Part 4: The Lock-Free Thief
Completing the lock-free deque with the `steal` operation. We look at how thieves safely race against the owner and how to integrate this into a robust scheduler.
-
Work-Stealing Deque Part 3: The Lock-Free Owner
Implementing the lock-free `push` and `pop` for the deque owner, handling cache alignment, and managing the race condition when the queue becomes empty.
-
Work-Stealing Deque Part 2: Memory Ordering
Moving beyond locks requires understanding how CPUs reorder instructions. We explore atomics, acquire/release semantics, and the illusion of sequential execution.
-
Work-Stealing Deque Part 1: The Problem with Locks
Why a central task queue becomes a bottleneck, how false sharing kills performance, and building a baseline implementation with locks.
-
Memory Magic Part 4: The Infinite Buffer
What if you could write to a buffer and have it loop forever, with no branches, no checks, and no wrap-around logic?
-
Memory Magic Part 3: The Specialist's Toolkit
What if your allocator could recycle like a pro, pack for cache, perfect loops, and deliver unbreakable handles, without leaks or dangling pointers?
-
Memory Magic Part 2: The Arena Allocator
Stop asking the OS for memory. Learn how to build an Arena: a private memory block where allocation is instant and an entire class of bugs is impossible.
-
Memory Magic Part 1: The Pointer is a Lie (A Dive into Virtual Memory)
Ever wondered how your computer runs multiple programs without them setting each other on fire? The answer is Virtual Memory.