2 ms·
I suspect it's the same with memory, nobody checks that malloc doesn't return 0.
by tonyedgecombe 8y ago
I suspect it's the same with memory, nobody checks that malloc doesn't return 0.
- WalterBright 8y agoThat's right, but at least these days you'll get seg fault if you try to use it. Back in the bad old DOS days, NULL pointers pointed at the interrupt dispatch table, so running out of memory (awfully common on a 640K machine) meant you trampled all over the operating system. It was so bad that I'd defensively reboot my machine constantly while debugging. DOS extenders saved the day, because they ran code in protected mode. I never developed code in real mode again, I just ported fully debugged code to it.