Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!kth.se!news From: d88-jwa@nada.kth.se (Jon W{tte) Newsgroups: comp.sys.mac.system Subject: Re: Memory (de)fragmentation Message-ID: <1990May31.104725.13629@kth.se> Date: 31 May 90 10:47:25 GMT References: <16797@phoenix.Princeton.EDU> Sender: news@kth.se (News Administrator) Reply-To: d88-jwa@nada.kth.se (Jon W{tte) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 36 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? Think about it - if you have a program running, it has a stack. This stack contains many things, among them pointers to variables (in the heap) and return addresses from JSRs. If you moved the heap, these would point out into unknown space, and crash the application (machine ?) > Does an application (in other systems) have to have contiguous memory > to run or is it just to make things easier? Most OSes require contiguous memory. UNIX, VMS and the likes solve this with additional hardware (i.e. a MMU) and virtual memory. These features will be in System 7, for those who have a MMU or 68030. > So to defragment the heap, I have to quit some applications -- and > then launch them again. How do I know which applications? Why doesn't You don't > the "About Finder" dialogue show the heap fragmentation? And perhaps a > "Combine free memory" button, too. Something like this... It probably would be confusing to naive users... > I assume memory defragmentation is difficult to implement -- otherwise You really can't - unless you quit the applications you move. Select "Set Startup" and "Active Applications", and then select "Restart" is a good way of defragmenting if you've got too deep...\ Jon W{tte, Stockholm, Sweden, h+@nada.kth.se