2 ms·
> That requires protected memory I know. I was so happy to see real mode DOS go away. > an implementation _could_ hide the “it’s not a Foo” bit in any unused
by WalterBright 5y ago
> That requires protected memory
I know. I was so happy to see real mode DOS go away.
> an implementation _could_ hide the “it’s not a Foo” bit in any unused bit
Yes, it could. But it requires extra instructions to check it. Null gets checked for free (no extra instructions or time) by the hardware. A seg fault isn't any more dangerous than an assert failure.
- mhh__ 5y agoMemory tagging (the hardware checks certain bits of a pointer, not just if it's null) is becoming more and more common in the non-X86 world.