Jump to content
  • Advertisement
Sign in to follow this  
Coluna

std::bad_alloc

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

Hello; I know i got this exception when there is no room avaliable...but my app is allocating a few megs, and for sure there is more avaliable memory...im using VS 2003, in debug multithread mode (althoug i use threads only for sounds, not being loaded any in this case), and when i alocate a big chunk at beggining, it does not throw this exception...could it be happening due to fragmentation or bad ompiler configuration, or even its a matter of re-install VS? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
It may be due to heap corruption. Check to make sure you don't have any buffer overruns in your program or any other non-kosher pointer mixups.

Share this post


Link to post
Share on other sites
For later reference, std::bad_alloc::what() might also give some human readable explanation of what went wrong, depending on implementation.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!