• Advertisement
Sign in to follow this  

_crtBreakAlloc problems

This topic is 4794 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've used _crtBreakAlloc to find memory leaks before, but now its giving me a wierd problem. My program breaks out as if I had set _crtBreakAlloc myself with a value of -1. I know -1 is the value given at the start of a run to prevent the program breaking, yet it breaks out as if it got to allocation number -1?!?! This problem only occurs after I've been running the program for several hours (generally overnight) so its really hard to know where its all going wrong. Is it perhaps an out of memory error or something? Any insights much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Do you check that your allocations succeed? It sounds like you'r running out of memory as you said, and that most likely means a memory-leak.
Have you tried using: _CrtDumpMemoryLeaks?
Or even better: _CrtMemCheckpoint and _CrtMemDumpStatistics.

Good hunting! :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement