4 ms·
> I assume these values mean that I can have 2^39 bytes of actual RAM and 2^48 bytes of virtual address space: Yes. There’s no point having 64 physical address
by colejohnson66 9y ago
> I assume these values mean that I can have 2^39 bytes of actual RAM and 2^48 bytes of virtual address space:
Yes. There’s no point having 64 physical address lines if 26 of them aren’t going to be used by anything
- FRex 9y agoWhere does the number 21 come from?
- colejohnson66 9y agoMy brain said 64 - 39 is 21... my bad
- andrewmu 9y agoOne use is tagged pointers, using the top unused address bits for e.g. type information (https://en.wikipedia.org/wiki/Tagged_pointer https://en.wikipedia.org/wiki/Tagged_pointer)
- FRex 9y agoLuaJIT is where I originally ran into this. It uses both NaN tagging with C doubles and tagged pointers with 64 bit pointers.
- nemanjaboric 9y agoWe're using this technique to stuff the file descriptor with the accompanying object for the epoll registration, so one can check if the (reusable) object was reused for something else while registered with other file descriptor in the epoll: https://github.com/sociomantic-tsunami/ocean/blob/ee4f78d527551c2034697a998a56abd19813ca4c/src/ocean/io/select/selector/EpollFdSanity.d#L60 https://github.com/sociomantic-tsunami/ocean/blob/ee4f78d527...
- IcePic 9y agoAmiga programming manuals were very clear about not (ab)using the top 8 bits even if the A1000/500/2000 were only equipped with 24 physical pins for memory (limited to 16M), so of course Microsoft Basic for amiga used the upper bits, and when the 68020+ cards arrived, it broke since the upper 8 bits actually pointed somewhere. What is inconceivable today, will be reality at some point.
- bonzini 9y agoThe same happened for Mac OS.
- dfox 9y agoOn amd64 (and IIRC also Alpha) hardware checks that unused bits of address are all equal to highest used bit (or IIRC all zero on Alpha) to discourage this kind of tricks. And I vaguely remember that ESA/390 is actually 32bit address architecture in hardware and it's 31bitness comes from using highest bit of address as a flag that such tricks are taking place.
- deleted 9y ago[deleted]