Re:Handles Are the Better Pointers (2018)
by duskwuff on Thursday August 13, 2020 @05:04PM
(#24149122)
> Handles were used all the way through System 7
Handles continued to be used all the way through Mac OS 9, as they were used by a ton of critical Toolbox APIs like the Resource Manager. A vestigal version even existed in Mac OS X -- handles still existed in Carbon, but I'm not sure they would ever be relocated by the system like they were previously.
> of course these later gen machines did have MMUs.
They did, but it was only used to simulate a system with more physical memory. Every process still saw the same view of a single "flat" memory space.
Re:Handles Are the Better Pointers (2018)
by news_to_me on Thursday August 13, 2020 @12:26PM
(#24145117)
> the system process was free to clean up the heap and manipulate your pointers b/c your app would only yield at specific points where you aren't holding onto a dereferenced handle.
True, but it was also your job as a developer to not be holding onto those pointers when the memory manager ran.
In ye olden days, addressing was probably physical, so being non-multi-tasking ensured the safety of using handles, ie if used properly. IOW the system process was free to clean up the heap and manipulate your pointers b/c your app would only yield at specific points where you aren't holding onto a dereferenced handle.