|
|
|
|
|
by buserror
3543 days ago
|
|
Classic MacOS dealt with the memory fragmentation in a pretty neat way tho.
All code was relocatable to start with, and pretty much every memory block you'd allocate was also relocatable by using one further level of indirection called a Handle.
A Handle was basically a pointer to a pointer. A Handle defaulted to 'unlocked' so the actual memory block could move at any time; unless you Locked it, and Unlocked it afterward. This allowed the OS to compact the memory heap, move all the relocatable blocks in one corner and allow further contiguous blocks to be allocated. Of course, this is a primitive concept these days, but it allowed amazing pieces of software to exist on very, very small memory systems. |
|
(This kindles some fond memories of MacOS classic development along with the Inside Macintosh books...)