Please enable JavaScript to view this site.

Memory Validator Help

Navigation: The User Interface > Tools

Uninitialized memory detector

Scroll Prev Top Next More


Uninitialised memory


Memory Validator can detect potentially uninitialized data by looking for memory allocations that have the Microsoft® uninitialized data signature in them.


The debug C runtime heap initialises all allocated memory with a signature byte of 0xCD.


Bit patterns in memory are sought out that match the default values:


0xCD for BYTEs


0xCDCDCDCD for 32 bit pointers (and DWORDs)

0xCDCDCDCDCDCDCDCD for 64 bit pointers (and QWORDs)


Any objects found with the signature are displayed in the Memory tab which is updated to display the allocations with uninitialised memory.


note Uninitialized data detection is only available when your program is compiled in _DEBUG mode.


seeAlsoSee the global settings for checking uninitialised data.



False positives


It may not be that uncommon to find a byte that has actually been deliberately initialised to 0xCD by the program - a 1 in 256 chance for random data for example.


It's less likely to find words similarly initialised to 0xCDCD, very unlikely to find such DWORDS (1 in 4 billion for random data), and exceptionally unlikely to find such QWORDS (1 in 16 quintillion for random data).


Because of this, you should use your own judgement as to whether reported allocations are false positives, based on what you know about the behaviour of your program.



Invoking a memory initialisation check


Use one of the following methods during a session to start uninitialized memory detection:


menu Tools menu instructionStep Check Initialised instructionStep performs the check


or click the Check Initialised icon on the session toolbar.