Path: utzoo!attcan!uunet!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!tut!santra!cs.hut.fi!juh From: juh@cs.hut.fi (Juha Hyv|nen) Newsgroups: comp.sys.mac.system Subject: Memory (de)fragmentation Message-ID: Date: 30 May 90 13:36:59 GMT References: <16797@phoenix.Princeton.EDU> <1990May29.145842.18701@kth.se> Sender: news@santra.uucp (Cnews - USENET news system) Organization: Helsinki University of Technology, Finland Lines: 58 In-Reply-To: d88-jwa@nada.kth.se's message of 29 May 90 14:58:42 GMT In article <1990May29.145842.18701@kth.se> d88-jwa@nada.kth.se (Jon W{tte) writes: +------------------------ ! 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. +........................ Why can't (application) heaps move? Is it the same in all (operating) systems or is it just the way Apple choose to do? Does an application (in other systems) have to have contiguous memory to run or is it just to make things easier? +------------------------ ! 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. +........................ 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 the "About Finder" dialogue show the heap fragmentation? And perhaps a "Combine free memory" button, too. Something like this... ------------------------------------------- System 400 K ::::xxxxxxxxxxxx ------------------------------------------- Finder 160 K :xxxxxx Appl A 100 K :xxx --------- ***** 100 K :::: | Combine | Appl B 200 K ::xxxxxx | free | ***** 64 K ::: | memory | ------------------------------------------- --------- I assume memory defragmentation is difficult to implement -- otherwise it would have been already done in the current system (wouldn't it). If the defragmentation cannot be implemented, at least the above tells me I only have to quit B (and launch it again) to combine the free memory manually. / (.__o .. /_/ __/ Juha Hyvonen ! / ! !/ ) ! juh@cs.hut.fi ------