Richard said:
0, why? I can honestly say I have never programmed a system where I
needed a pointer to address 0. So I dont spend too much time worrying
about it in order to keep things simple.
I seem to recall that I used to work with some chips that had
interrupt vectors starting right from address 0. That was some time
ago, but it wouldn't surprise me if the descendants of those
chips were still in use.
Architectural oddity story:
The Silicon Graphics (SGI) workstations were designed with
memory starting from the 4Kb boundary, which was used for graphics
because memory was expensive then and smaller pointers and smaller
branch offsets could be used for very low addresses. At the time
of the design, memory from 0 to 4Kb-1 was not populated, so
dereferencing the 0 pointer caused an address fault.
Eventually, though, when SGI upgraded CPUs to the MIPS R8000 family
(and then the R10000), SGI changed the basic kernel page size to 8K
instead of 4K. Which meant that in order for that graphics memory
at 4K to be within a page, the entire page from 0 to 8K had to be mapped.
And suddenly dereferencing the 0 pointer did not cause an address
fault and writing through the null pointer or small offsets of the
null pointer (e.g., a structure offset relative to a null pointer)
caused real memory to be written, leading to various kinds of excitement.