Skip to main content
GameDev.net gamedev.net
🔒 Locked

std::bad_alloc

Started by Coluna Sep 13, 2005 at 8:03 AM 2 replies 450+ views
Original Post
Coluna
Coluna
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!
SiCrane
SiCrane
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.
Coluna
Coluna
Got it...overrun...but it wasnt my fault, the code was developed by my coworker :-( ...thanks!
c2_0
c2_0
For later reference, std::bad_alloc::what() might also give some human readable explanation of what went wrong, depending on implementation.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.