Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!cbmvax!ken From: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Newsgroups: comp.sys.amiga.programmer Subject: Re: Memory fragging Message-ID: <21953@cbmvax.commodore.com> Date: 28 May 91 14:56:14 GMT References: <1991May21.195251.16477@zorch.SF-Bay.ORG> <21795@cbmvax.commodore.com> <886@dvncnms.Devoncnms.Unisys.COM> <21884@cbmvax.commodore.com> <2885@public.BTR.COM> Reply-To: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Organization: Commodore, West Chester, PA Lines: 17 In article <2885@public.BTR.COM> eeh@public.BTR.COM (Eduardo E. Horvath eeh@btr.com) writes: >I read the RKM Intuition manual at least five times trying to puzzle out >the use for AllocRemember() and FreeRemeber(). I always thought I was >missing something. Why would anyone want to allocate a large number >of memory blocks, and then forget what they allocated? What is the >reason for FreeRemeber(FALSE) ? AllocRemember() returns a pointer to the memory block as well as linking the allocation into the remember chain. If you save the pointer to the memory block and call FreeRemember(FALSE), you can then track the memory yourself and later free it with a call to FreeMem(). It is much more efficient to just use AllocMem()/FreeMem() and forget AllocRemember(). -- -- Ken Farinsky - CATS - (215) 431-9421 - Commodore Business Machines uucp: ken@cbmvax.commodore.com or ...{uunet,rutgers}!cbmvax!ken bix: kfarinsky