Hacker News new | ask | show | jobs
by WalterBright 1494 days 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.

1 comments

Memory 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.