related but slightly off topic. It is Andy Hertzfeld apologizing for using the bits above 24 when creating the OS. Which created a pattern for other developers to follow.
Its a pretty good post that talks about decisions one makes that you don't always fully know the consequences. (in this case, leading toward programs not working in 32-bit mode.)
Ah thanks! Makes sense.
So a “master pointer” is a structure that includes a pointer to a pointer. That inner pointer points to the memory for the application to use. When you call GetHandle(..) you are returned a handle that is the pointer to the pointer and the memory manager will have allocated the memory for you so you are good to use that pointer. But the whole point of master pointers is that the system can manage memory invisibly to your application by moving around the memory your data uses without you knowing (as long as you double dereference the pointer to the pointer you are good). They give you a way to tag your memory so that the memory manager won’t move your memory behind the scenes as there are times when appropriate (it’s up to you the developer to decide tho! One example is if youre using a function that works on a pointer to memory then you give it the dereferenced handle but if you don’t tag that block as Locked then the OS might move your memory while you’re working with the pointer! Purgeable is more a you can be a good citizen and tell the OS it is ok if you take this memory away from me and I can just repopulate it later or whatever.) These are the locked and purgeable attributes Andy mentions.
So he / the mac team had to store those flags somewhere so the system would know if a block of memory was purgeable or locked and he used some of the 8 bits that were of no use to the 68000 chip since it could only address 24 bits of memory it would never use the remaining 8 bits in the 32-bit address. A nice use if a wasted byte of memory that comes in every 32-bit address but alas the pitfall is clear with hindsight ;-)
Sounds like some developers started using some of those 8 bits as well. And the result is what we all call “32-bit dirty” because by the time system 7 came, those bits were used as actual parts of valid addresses of memory so nobody (not the OS or the applications) could do anything with them. System 7 had updated its mem managers etc to not use them so it was clean from the get go but apps that had gotten away with being slick with those bits now had problems because they were accessing and manipulating memory that was not what they thought it was (likely belonging to other apps or the system) and of course that would cause problems.
Sorry for my diatribe i just thought someone might be interested in some deeper info. Anyone plz correct anything I got wrong