c++windowsheap-memoryheap

Which option has precendence if I enable and disable FrontEndHeapDebugOptions at the same time?


The undocumented (I can't find a MSDN reference) FrontEndHeapDebugOptions Registry key has two flags:

This is e.g. mentioned in the Windows Internals 7 book. The book doesn't further explain the Registry key.

I see that we need 2 bits here, because Microsoft wants a 3-state flag: enabled, disabled and default.

But since both, enabled and disabled can now be specified at the same time, which one takes precedence?

For completeness, above setting is a DWORD under
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MyApp.exe


Solution

  • I have created a small application which allocates memory in a loop. I then used WinDbg's !heap command to check what kind of heaps were created. Running it on Windows 10 22H2 (Build 19045.5247) revealed the following: