|
From: Adam J. <aj...@i-...> - 2007-07-18 01:24:36
|
>>Per Westermark wrote: >>No, the application will not crach for a str[10]; unless the target is an >>embedded system with extremely small stack - str[10] is smaller than "int >>a,b,c" on a 32-bit machine... You've missed my point completely. For that, I take the blame....... >> Don't assume that you know what I think is okay. I would never do that. All I do know is what you wrote. You wrote >>There are no pointer to test. If the >>allocation fails (the stack can't fit the variable) then the application >>will die. >From this statement that you made, I assumed that you did not see a point to checking if the allocation was not successful. But you made my point later when you stated: >>It is a good habit to always check a pointer retrieved from malloc() or >>new(), just as checking the result from all other functions that may fail. This was the only point I was trying to make. Nothing more or less.... -Adam Jones |