Path: utzoo!attcan!uunet!samsung!rex!ames!eos!shelby!neon!kaufman From: kaufman@Neon.Stanford.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.system Subject: Re: Memory (de)fragmentation Message-ID: <1990May30.170030.11428@Neon.Stanford.EDU> Date: 30 May 90 17:00:30 GMT References: <1990May29.145842.18701@kth.se> Organization: Computer Science Department, Stanford University Lines: 19 In article juh@cs.hut.fi (Juha Hyv|nen) writes: >Why can't (application) heaps move? Is it the same in all (operating) >systems or is it just the way Apple choose to do? Because running applications have absolute pointers to items in the heap (e.g. return addresses for procedure calls), and these cannot be identified out of context and modified after the program is started. This is also true in Unix systems that run on non-memory-managed hardware. If you have an MMU, you can make each application think it starts at some fixed address, and then physically move applications by rewriting the MMU mapping registers (so that the application ALWAYS thinks it runs at that address). The pre-680[23]0 MACs do not have memory management. Even if they did, there is too much of the OS that depends on being able to produce address references to multiple application spaces in a unique manner (the Window Manager for instance, and various things that run out of the System Heap). Marc Kaufman (kaufman@Neon.stanford.edu)