Click here to Skip to main content
15,885,782 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My Google-fu is failing hard, I was looking throug google and the MSDN search for a page I'm fairly sure I saw some time ago which listed all the debugger magic values for memory initialization, lice 0xCC for stack memory, 0xCD for allocated clean heap memory and so on.

What I have tried:

I tried for half an hour with any combination of keywords I could come up to, including the values I remember in order to guid the search engine but every result brings me outside MSDN and is at least incomplete as usually it deals only with heap.
Posted
Updated 20-Feb-18 5:08am
Comments
Richard MacCutchan 20-Feb-18 9:42am    
Tried a few combinations of words but only got to SO.

1 solution

Try

Inside CRT: Debug Heap Management[^]

But from my own notes also:

This is a list of some of the know magic numbers used by
Microsoft which can be useful to know when debugging an application.

0xABABABAB
Guard Bytes used by HeapAlloc() or LocalAlloc to mark "no man’s land" after allocated heap memory.

0xBAADFOOD
Used by LocalAlloc(LMEM_FIXED) to mark uninitialised allocated heap memory.

0xBEEFCACE
Used by Microsoft .NET as a magic number in resource files.

0xCCCCCCCC
Used by the C++ debugging runtime library to mark uninitialised stack memory.
(You need to compile with /GZ for this to occur - 0xCC is the opcode for INT 3 - breakpoint)

0xCDCDCDCD
Used by the C++ debugging runtime library to mark uninitialised heap (malloc/new) memory

0xDEADDEAD
A Windows STOP error code used when the user manually initiates a crash.

0xFDFDFDFD
Guard Bytes / Fence memory used by the C++ debugging heap to mark "no man’s land" before
and after allocated heap memory.

0xFEEEFEEE
Used by HeapFree() to mark freed heap memory.

0xDDDDDDDD

The freed (free/delete) blocks kept unused in the debug heap’s linked list when the
_CRTDBG_DELAY_FREE_MEM_DF flag is set are currently filled with 0xDD.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900