Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!univse.dec.com!shatara From: shatara@univse.dec.com (Chris Shatara, Chelmsford, Ma.) Newsgroups: comp.sys.apple Subject: More on MemoryMgr understanding problems. Message-ID: <8811021427.AA07267@decwrl.dec.com> Date: 2 Nov 88 17:25:00 GMT Organization: Digital Equipment Corporation Lines: 40 RE: Keith's response to my querry....... >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. I had tried the CompactMem route with the same result. Let me show you how the memory was allocated in the first place... When I need some memory for a found Identifier, I invoke the following Function: Function NewPtr(MemID,NumBytes:integer):ptr; var dummy : handle begin dummy := NewHandle(Numbytes,MemID,FixedBank+locked,ptr(0)); HLock(dummy); NewPtr := dummy^; end; The memoryID passed to the function is the one with the AuxBits set to $1. When through with the cross reference listing, I then tried to freeup the memory as indicated earlier: HUnlockAll(MemId); DisposeAll(MemId); { CompactMem; had tried this but it made no difference } Thanks in advance for all your help...Chris Shatara