← Back to context

Comment by Dwedit

15 days 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.

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

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

  • 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.