Path: utzoo!yunexus!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!dali!rpi!uupsi!sunic!kth.se!news From: d88-jwa@nada.kth.se (Jon W{tte) Newsgroups: comp.sys.mac.system Subject: Re: Killing the Finder to free up more RAM under Multifinder? Message-ID: <1990May29.145842.18701@kth.se> Date: 29 May 90 14:58:42 GMT Article-I.D.: kth.1990May29.145842.18701 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: 70 In article , juh@cs.hut.fi (Juha Hyv|nen) writes: > About Finder box: > Total Memory: 1024 K Largest block: 64 K ^^^^ > Appl A 300 K > Finder 160 K > System 500 K > Application B requires 200 K. If I quit the Finder can I launch B? No. You'd end up with two blocks - one 64K and one 160K. These can't be recombined to one larger block, since the application blocks (heaps) can't move. Think of memory as one huge block. Now, everytime an application starts, it will get as much of the lowest block that will contain it as it wants. This memory is marked occupied until the application quits. The Finder is normally opened first, and gets the bottom n k's (where n should be > 160 for optimum performance, by the way) The next opened application gets the next m k's and so forth. Now, let's say you first launch Fidner, then A, then B, the heap would look like this: -------------------------- System Heap -------------------------- Free Space -------------------------- Application B -------------------------- Application A -------------------------- Finder -------------------------- If you quit the finder, you only regain the amount of memory it occupies in one block; this can't be recombined with the other free memory. If you later quit Application A, you'll get one larger block with the space of the Finder and that of Application A combined, since they're contiguous. If you launch and quit many applications, in no particular order, it's fully possible you could end up with three apps running, > 1 MB free, but only 300 k as the largest block. This is called heap fragmentation. (Note: "Heap" is here the global memory, not the system heap, nor any particular Application heap. The system heap may expand downwards, by the way) h+ --- Stay alert ! - Trust no one ! - Keep your laser handy ! --- h+@nada.kth.se == h+@proxxi.se == Jon Watte longer .sig available on request