lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wed, Sep 15, 2021 at 4:45 PM Gé Weijers <> wrote:

On Wed, Sep 15, 2021 at 6:51 AM Philippe Verdy <> wrote:

Le mer. 15 sept. 2021 à 14:53, Flyer31 Test <> a écrit :
No modern is allows any user space program to use adresses longer than 48 bit, and once you pack short strings in tagged NaN, you can also add alignement contraints for string buffers, and all other pointers needed for complexe types like table, and so allow adding 2bits for handles/objectids, leaning that you can use a giant user space with 50-bit pointers... In practice, this limit will not be reached at all.

Intel introduced 56-bit virtual addresses and 5 level page tables in Ice Lake, and support for this war merged into Linux in 2016. Laptop processors that support this have been shipping for 2 years. 

If you align everything to 8-byte boundaries (as you would if tagged doubles are your basic data structure) you can knock off the bottom three bits, fitting a 55-bit pointer into the mantissa. You can borrow two different NaNs to represent the high bit if you really need it.

But yes, the scaling limits are distinctly finite, which puts limit on the long-term viability of the techique.

/s/ Adam