In the Windows 7 kernel

Ooh, it looks messy in there. Some of the stuff about how they’re resolving the DLL dependencies is interesting, although I suspect it’ll make DLL Hell even more complicated.

I loved this particular gem, though:

Microsoft observed that 15 per cent of all user-mode crashes and 30 per cent of shutdown crashes were caused by heap corruption: applications that try to access freed memory, or memory beyond what is allocated. Its solution was a feature called the Fault Tolerant Heap (FTH).

If an application crashes a few times, Windows will automatically apply a shim that intercepts its memory operations. FTH will over-allocate memory, and keep a copy of freed memory so that attempts to re-read it will succeed. The user gets better reliability at the expense of performance, which suffers by up to 15 per cent or so, while buggy applications work better than you would expect.

Developers expressed some concern. Were their mistakes being disguised so that they would remain unfixed? It is a risk, though if Windows detects a debugger the feature turns itself off. You can also disable FTH, though not on a per-process basis.

Or you could write your operating system correctly the first time so that an application crash doesn’t bring the whole bloody machine down.

Copyright © Found
Jim Finnis' personal blog

Built on Notes Blog Core
Powered by WordPress