Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!mailrus!ukma!rutgers!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.apple Subject: Re: Help with //gs Memory Manager commands Message-ID: <19778@apple.Apple.COM> Date: 1 Nov 88 02:34:31 GMT References: <8810311658.AA01121@decwrl.dec.com> Organization: Apple Computer Inc, Cupertino, CA Lines: 35 In article <8810311658.AA01121@decwrl.dec.com> shatara@univse.dec.com (Chris Shatara, Chelmsford, Ma.) writes: > > When I'm through printing out the cross reference listing, I want > to deallocate and free up the space which was locked for each of the > identifiers in my binary tree. > > I did the following: > > UnLockAll(XrefMemID) {unlock all pointer with this ID} > DisposeAll(XrefMemID) {free up the memory space..I think} > > Invoking FreeMem before and after the above commands shows that I > am not gaining back memory that was allocated and in fact I'm losing > more. > >Am I interpreting these command wrongly? I tried PurgeAll(XrefMemID) in >place of DisposeAll and had the same results? > You may also want to throw in a CompactMem() to really force the Memory Manager to clean up. This one confuses me, as what you are doing should work. The problem probably comes from the fact that the memory manager, in an effort to do as little work as possible and hence run more quickly, may not actually get rid of the memory you used to have allocated; it may be just marked 'available'. FreeMem() only returns the amount of memory that is actually free for use at that instant. Keith Rollin UUCP: amdahl\ Developer Technical Support pyramid!sun !apple!keith Apple Computer decwrl/ BITNET: keith%apple.com@relay.cs.net "You can do what you want to me, but leave my computer alone!"