5 ms·
Of course not, it's reading the entire program from a floppy disk
by foodstances 5y ago
Of course not, it's reading the entire program from a floppy disk
- Someone 5y agoNot the entire program; that wouldn’t have fitted in memory. The Segment Loader in classic Mac OS supported something similar to program overlays (https://en.wikipedia.org/wiki/Overlay_(programming) https://en.wikipedia.org/wiki/Overlay_(programming)) in the sense that it allowed programs to be larger than available memory, but with an extra feature that, if memory permitted (it rarely did in the 128k Mac) segments could stay in memory.
- grishka 5y agoI thought classic Mac OS didn't have anything resembling virtual memory until its very final versions? How did that kind of segmentation work without virtual memory? Would you as a programmer have to keep track of which segments are loaded, ask the OS to load/unload them as needed, then just jump into that memory?
- Someone 5y agoLoading was automatic. Cross-segment calls were done using a system trap that brought in the code, locked it in memory and called a function at the specified offset in it. IIRC, unloading told the OS that the memory block containing the code now could be moved around or freed at will. Those cross-segment calls were slow, so distributing one’s code over various parts was a black art. You wanted a single segment for performance, multiple segments to leave more memory available for user data.