GCC/XCode equivalent of _CrtCheckMemory?

Posted by Chris Becke on Stack Overflow See other posts from Stack Overflow or by Chris Becke
Published on 2010-06-11T07:59:29Z Indexed on 2010/06/11 8:03 UTC
Read the original article Hit count: 277

Filed under:
|
|
|

When dealing with random memory overwrites, in MSVC it is possible to validate the state of the heap at various points with a call to _CrtCheckMemory, and know with at least a small level of confidence that the code up until the check was not responsible for any errors that might cause new or malloc to fail later.

In XCode, whats the equivalent way to try and box in a memory overwrite? All I have at the moment is a random failure of a call to new, somewhere deep in the bowels of some code with no real idea of how long the code has been running with a corrupt heap up until that point.

© Stack Overflow or respective owner

Related posts about c++

Related posts about xcode