Advertisement Jump to content
Sign in to follow this  
Coluna

std::bad_alloc

This topic is 4880 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!