Tip - Debug heap will fill some values in memory which is managed. By checking the memory values of an address, we are able to identify the characteristic of memory allocation details.
1. 0xCD – The memory locations filled with this magic number are allocated in heap and is not initialized.
2. 0xFD – This magic number is known as “NoMansLand”. The debug heap will fill the boundary of the allocated memory block will this value. If you are rewriting this value, then it means, you are beyond an allocated memory block.
3. 0xCC – The memory locations filled with this magic number means, it’s allocated in stack but not initialized. You can see this when you a variable on stack and look at its memory location. You can use /GZ compiler option to get the same feature in release build.
4. 0xDD – The memory locations filled with this magic number are Released heap memory. But when I checked I am getting 0xEEFE(freed memory pattern) always instead of 0xDD.
Reference :
Posted By :Krishnaraj S.
No comments:
Post a Comment