The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Image
May 1, 2026
Post comments count 0
Post likes count 0

Developing a cross-process reader/writer lock with limited readers, part 4: Abandonment

Image
Raymond Chen

Recovering from death of the owner.

Image
Apr 30, 2026
Post comments count 3
Post likes count 2

Developing a cross-process reader/writer lock with limited readers, part 3: Fairness

Image
Raymond Chen

Let the exclusive acquisition have a fair chance against shared acquisitions.

Image
Apr 29, 2026
Post comments count 1
Post likes count 2

Developing a cross-process reader/writer lock with limited readers, part 2: Taking turns when being grabby

Image
Raymond Chen

Please, not everybody, everything all at once.

Image
Apr 28, 2026
Post comments count 10
Post likes count 2

Developing a cross-process reader/writer lock with limited readers, part 1: A semaphore

Image
Raymond Chen

A pot of tokens.

Image
Apr 27, 2026
Post comments count 8
Post likes count 2

Looking at consequences of passing too few register parameters to a C function on various architectures

Image
Raymond Chen

It's bad news no matter how you slice it, but Itanium makes it even worse.

Image
Apr 24, 2026
Post comments count 3
Post likes count 2

Defending against exceptions in a scope_exit RAII type

Image
Raymond Chen

But maybe it's not worth it.

Image
Apr 23, 2026
Post comments count 12
Post likes count 2

Another crash caused by uninstaller code injection into Explorer

Image
Raymond Chen

Inadvertently destroying a staircase while standing on it.

Image
Apr 22, 2026
Post comments count 2
Post likes count 3

Mapping the page tables into memory via the page tables

Image
Raymond Chen

So-called "fractal page mapping".

Image
Apr 21, 2026
Post comments count 32
Post likes count 3

Sure, xor’ing a register with itself is the idiom for zeroing it out, but why not sub?

Image
Raymond Chen

Somehow xor became the most popular version.