Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!olivea!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: CompactMem with MultiFinder partitions Keywords: Multifinder, Partitions, fragmented memory Message-ID: <54216@apple.Apple.COM> Date: 20 Jun 91 23:44:03 GMT References: <1991Jun20.041856.5918@cec1.wustl.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 27 In article <1991Jun20.041856.5918@cec1.wustl.edu> jyp@wucs1.wustl.edu (Jerome Yvon Plun) writes: >If you have multiple applications being launched and terminating in random >order, you are bound to fragment your memory and not be able to obtain a >application partition as big as the free memory. >If we were dealing with handle, a call to CompactMem would do the trick >(as in NewHandle or NewPtr). Can a similar approach be undertaken by a >little program that would move an entire partition in memory and update >the value of A5 for that partition? > >In fact, if there exists such a tool, I would be pleased to hear about it. >If not and the method I suggested is feasible, I might write a little >application implementing it. The method you suggest is not feasible. There are non-relocatable blocks in the application heap that you cannot move. For example, window records are non-relocatable. You can't move these when you move the app heap without updating all references to them. And there's no way you can find all valid references to non-relocatable blocks. Similarly, the master pointer blocks are non-relocatable, too. -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "But where the senses fail us, reason must step in." - Galileo