Remix.run Logo
Dwedit 7 hours ago

In 32-bit windows, you used to be able to see if a pointer was valid or not by seeing if it pointed to the last 2GB of address space. If it did, it was pointing to Kernel memory that was not valid for user mode code.

But then Large Address Aware (4GB limit) changes everything, and you can't do that anymore. In order for a program to be Large Address Aware, you need to not try to do things like check high bits of pointers, then every single library and DLL you use also needs to do the same.

raw_anon_1111 7 hours ago | parent [-]

That sounds like the same ugly hack that caused programs not to be “32 bit clean” back in the day for Macs

ack_complete 2 hours ago | parent | next [-]

One difference is that the Mac OS itself was not initially 32-bit clean, with the top byte being used by the Memory Manager.

rwmj 5 hours ago | parent | prev [-]

Ah yes, these 68000 pointers have a spare 8 bits for me to use! Because nothing will ever need more than 16 MB of memory. Sigh.

projektfu an hour ago | parent | next [-]

It's all good if you have 128kb ram but they should have had a plan to escape it from day one.

dcrazy 2 hours ago | parent | prev [-]

This is how pointer authentication codes work on Arm64.