3 ms·
Yes, this reminds me of older computers. My Atari ST 1040 has something like 2MB of RAM but I'm sure the addressing is 32-bit, meaning that there are addresses
by rocky1138 10y ago
Yes, this reminds me of older computers. My Atari ST 1040 has something like 2MB of RAM but I'm sure the addressing is 32-bit, meaning that there are addresses that it can't ever reach.
In fact, doing some research shows that 8-bits of the address are often ignored on the Motorola 68000 leaving a 24-bit memory address.
- coldpie 10y agoI remember reading on HN that developers would use those unused bits to carry more data around. There was so little RAM available that the unused bits in pointer addresses were useful.
- Narishma 10y agoAnd it came back to bite them when later processors used those bits.
- serge2k 10y agoThat type of thing is still done today. For example, in V8 they use the bottom 2 bits of pointers for other things. They get away with it because objects are 4 byte aligned.
- jburgess777 10y agoLast time I looked, the current 64bit Intel CPUs only used the lower 48 bits for userspace virtual addresses. This leaves 16 bits available if you want to tag your pointers with some additional information. This can be useful for saving space or using them with an 8 byte cmpxchg. This kind of trick is easier to get away with if you know exactly which CPUs your software is going to run on. Otherwise your software could break horribly when a new generation of CPU comes around.