Click here to Skip to main content
15,921,250 members

Survey Results

When programming, do you explicitly test for out-of-memory conditions?   [Edit]

Survey period: 29 Sep 2008 to 6 Oct 2008

It's simple enough to do, but in this Gigabyte era, do you do it?

OptionVotes% 
Yes, always1167.71
Yes, mostly1036.85
Yes, sometimes26717.75
No87458.11
I don"t know how1449.57



 
GeneralRe: Stunned Pin
Hamed Musavi5-Oct-08 21:59
Hamed Musavi5-Oct-08 21:59 
GeneralWhat's the point? Pin
Rob Philpott1-Oct-08 6:43
Rob Philpott1-Oct-08 6:43 
GeneralRe: What's the point? Pin
chaiguy13373-Oct-08 5:20
chaiguy13373-Oct-08 5:20 
GeneralIt depends... Pin
Rob Grainger29-Sep-08 22:46
Rob Grainger29-Sep-08 22:46 
GeneralIt depends... Pin
jdryk.x1-Oct-08 4:40
jdryk.x1-Oct-08 4:40 
GeneralRelated ... Pin
Vasudevan Deepak Kumar29-Sep-08 9:01
Vasudevan Deepak Kumar29-Sep-08 9:01 
GeneralDepends on the application. [modified] Pin
John M. Drescher29-Sep-08 7:47
John M. Drescher29-Sep-08 7:47 
Generalwhat can you do anyway? Pin
patbob29-Sep-08 5:29
patbob29-Sep-08 5:29 
Sure, you've detected the condition, now what? You usually can't report it in any way to the user, and even if you could, what are they going to do about it anyway?

In today's age of 2+GB virtual address spaces, and page files that can conveniently be >2GB, running out of virtual memory is nearly always an indication of a more fundamental problem -- a memory leak. Since you're already leaking memory until you leak it all, by definition, you have no hope. The best you could possibly do is to report to the user "I'm broke. Please get the developers to fix me". A crash says exactly the same thing to the users and is easier to code Smile | :)

Of course, if the user asked you to do that, then you'd probably be better off checking to see if they have enough memory before trying instead of letting the allocation fail as your way to find out. And that's not really the spirit of the question.

patbob

JokeRe: what can you do anyway? Pin
Grimolfr30-Sep-08 6:43
Grimolfr30-Sep-08 6:43 
GeneralOnly when appropriate Pin
Ravi Bhavnani29-Sep-08 2:52
professionalRavi Bhavnani29-Sep-08 2:52 
GeneralMore Sensible Response Pin
W Balboos, GHB29-Sep-08 2:37
W Balboos, GHB29-Sep-08 2:37 
GeneralRe: More Sensible Response Pin
13xforever29-Sep-08 21:59
13xforever29-Sep-08 21:59 
GeneralRe: More Sensible Response Pin
W Balboos, GHB2-Oct-08 2:54
W Balboos, GHB2-Oct-08 2:54 
GeneralRe: More Sensible Response Pin
Paul Glaubitz30-Sep-08 9:20
Paul Glaubitz30-Sep-08 9:20 
GeneralRe: More Sensible Response Pin
W Balboos, GHB2-Oct-08 3:04
W Balboos, GHB2-Oct-08 3:04 
AnswerRe: More Sensible Response Pin
Paul Glaubitz2-Oct-08 3:27
Paul Glaubitz2-Oct-08 3:27 
GeneralMissing response Pin
Gary Wheeler29-Sep-08 0:14
Gary Wheeler29-Sep-08 0:14 
GeneralRe: Missing response Pin
Ravi Bhavnani29-Sep-08 2:46
professionalRavi Bhavnani29-Sep-08 2:46 
GeneralRe: Missing response Pin
Vasudevan Deepak Kumar29-Sep-08 9:10
Vasudevan Deepak Kumar29-Sep-08 9:10 
GeneralRe: Missing response Pin
Ravi Bhavnani29-Sep-08 9:13
professionalRavi Bhavnani29-Sep-08 9:13 
GeneralRe: Missing response Pin
Vasudevan Deepak Kumar29-Sep-08 9:23
Vasudevan Deepak Kumar29-Sep-08 9:23 
Generalnew throws exception Pin
ed welch28-Sep-08 22:01
ed welch28-Sep-08 22:01 
GeneralRe: new throws exception Pin
andy_p28-Sep-08 23:37
andy_p28-Sep-08 23:37 
GeneralRe: new throws exception Pin
Peter Rock29-Sep-08 2:01
Peter Rock29-Sep-08 2:01 
GeneralRe: new throws exception Pin
ed welch29-Sep-08 3:52
ed welch29-Sep-08 3:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.