3 ms·
> I think you might want to reread the line you quoted directly above this, I am reading exactly what I said: > You can write code that handles OOM conditions
by lelanthran 10mo ago
> I think you might want to reread the line you quoted directly above this,
I am reading exactly what I said:
> You can write code that handles OOM conditions gracefully, but that way of writing code is the default only in C.
How is it possible to read that as anything other than "That Way Of Writing Code Is The Default Way In C"?
Are you saying that checking the result of malloc (and others) is not the default way of allocating memory?
- gpm 10mo ago> Are you saying that checking the result of malloc (and others) is not the default way of allocating memory? In C - yes. I've said that repeatedly now...
- lelanthran 10mo ago>> Are you saying that checking the result of malloc (and others) is not the default way of allocating memory? > In C - yes. I've said that repeatedly now... Well, that's just not true. The instances of unchecked allocations are both few and far between, *and* treated as bugs when reported :-/ Maybe you should program in a language for a little bit before forming an opinion on it :-/
- gpm 10mo agoI have programmed in C plenty. Your assertion that unchecked allocations are few and far between is simply entirely incorrect. That they are treated as bugs when reported is incorrect in most C software. For good reason. Most C software is not designed to run in a situation where malloc might fail. I, unlike you, have provided evidence of this by pointing to major pieces of the linux desktop that do not do so.