3 ms·
If anyone's curious, here's an old article about working with handles and the Macintosh memory manager: http://preserve.mactech.com/articles/develop/issue_02/Me
by davepeck 3y ago
If anyone's curious, here's an old article about working with handles and the Macintosh memory manager: http://preserve.mactech.com/articles/develop/issue_02/Mem_Mgr_v006.html http://preserve.mactech.com/articles/develop/issue_02/Mem_Mg...
(The article's examples are in Pascal, the original language of choice for the Mac.)
—-
Update: wow, Apple still has bits of the original Inside Macintosh books available online. Here’s a section on the memory manager, replete with discussions of the “A5 world” and handle methods (MoveHHI, etc.) in Pascal: https://developer.apple.com/library/archive/documentation/mac/pdf/Memory/Intro_to_Mem_Mgmt.pdf https://developer.apple.com/library/archive/documentation/ma...
- sroussey 3y agoOh man, that brings back memories! Inside Macintosh. Pascal. … The article got virtual memory wrong to a bit.. it got much better over the years and using relocatable handles fell by the wayside to more plain pointers.
- OnlyMortal 3y agoI was using MPW C, writing with 68k for performance pinch points, and malloc() was much faster than NewHandle() - faster than NewPtr() too. I guess there was some simple pre-allocated larger block that got parts handed out on demand. Not unlike a modern implementation. I still miss MPW Shell.