January 25th, 2012

How do I disable the fault-tolerant heap?

A while back, I linked to a talk by Silviu Calinoiu on the fault-tolerant heap. But what if you don’t want the fault-tolerant heap? For example, during program development, you probably want to disable the fault-tolerant heap for your program: If the program is crashing, then it should crash so you can debug it! Method 1 is to disable the fault-tolerant heap globally. While this prevents the fault-tolerant heap from auto-activating in the future, it does not go back and undo activations that were enabled in the past. In other words, you have to remember to do this before your application crashes for the first time. Therefore, you probably want to combine Method 1 with Method 2 on the same page, where it gives instructions on how to reset the list of applications for which the fault-tolerant heap is enabled. Mario Raccagni provides a third way of disabling the fault tolerant heap, this time for one specific process instead of globally. His explanation is in Italian, so you get to exercise your translation skills.

tl;dr version: Go to the HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER versions of Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\your_application.exe and delete the Fault­Tolerant­Heap entry.

Topics
Code

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.