Re:Popular Myths about C++, Part 1
by linuxlizard on Tuesday December 09, 2014 @10:33AM
(#8723268)
While address space is huge, RAM isn't infinite. Our embedded Linux runs out of memory quite often. Or if the swap space fills up on a server with a disk.
I've spent many hours chasing corrupted memory due to someone not checking malloc() fail.
I chased code that boiled down to assert( ptr=malloc() );
Guess what happens when NDEBUG is defined?
I've spent many hours chasing corrupted memory due to someone not checking malloc() fail.
I chased code that boiled down to assert( ptr=malloc() ); Guess what happens when NDEBUG is defined?