Tuesday 22 July 2008

Debugging memory problems on Windows

There's a handy utility called gflags.exe which comes as part of Microsoft's Debugging tools package - it allows you to tweak various debugging features embedded in Windows ntdll.dll (the dll that handles memory allocation etc for all windows apps). One of the most useful features is enabling of pageheap which basically causes your app to crash (so you can catch it in a suitable debugger) when it encounters a memory allocation bug. You can use gflags on the command line or with its GUI - just enter the name of the executable (no path required) - and they start playing with those check boxes.

No comments:

Post a Comment