Hacker News new | ask | show | jobs
by jforberg 2609 days ago
In a system with virtual memory, you would typically ensure that address 0 (i.e. the lowest page) is unmapped. This causes an error condition if the address is ever read or written, which is useful because 0 is used as a placeholder value (i.e. NULL) in many situations. But this is a conscious decision by the system not to use this page, there's nothing technically stopping you from mapping it and putting some data at virtual address 0.

In a bare-metal environment, there's nothing saying that physical address zero must be unused by the hardware designer.

So I think it's quite the opposite: There's no requirement that address 0 must be unoccupied in any situation, it just so happens that many operating systems choose to leave it unmapped as a debugging aid for developers.