• Advertisement
Sign in to follow this  

nomemory.cpp?

This topic is 4554 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

Heap corruption detected at 08E51FE8
First-chance exception at 0x7c92a1e1 in Alpha 0.3 - Client.exe: 0xC0000005: Access violation reading location 0x00000000.
First-chance exception at 0x7c81eb33 in Alpha 0.3 - Client.exe: Microsoft C++ exception: std::bad_alloc @ 0x090dfc9c.
Unhandled exception at 0x7c81eb33 in Alpha 0.3 - Client.exe: Microsoft C++ exception: std::bad_alloc @ 0x090dfc9c.

I keep getting this run-time error. I'm writting a client/server game, and it happens to the client after a second player has been on the screen for 10-15secs. I'm assuming it's because I'm allocating memory dynamicly, and then not freeing it up. But I've looked over my code and can't figure it out. When I open Task Manager, it doesn't show that the ammount of free memory is going down. Any suggestions as to how I can track this down?

Share this post


Link to post
Share on other sites
Advertisement
The key to your problem is this: "Heap corruption detected at 08E51FE8". Heap corruption can occur when you allocate a certain amount of memory and then write values outside of that allocated memory. Something like this:

p = new int[1000];
p[-1] = 0; // bad
p[1000] = 0; // bad

Share this post


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

  • Advertisement