Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!cbmvax!peter From: peter@cbmvax.commodore.com (Peter Cherna) Newsgroups: comp.sys.amiga.programmer Subject: Re: Memory fragging Message-ID: <21963@cbmvax.commodore.com> Date: 28 May 91 15:47:23 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: peter@cbmvax.commodore.com (Peter Cherna) Organization: Commodore-Amiga, Inc. West Chester, PA. Lines: 24 In article <2885@public.BTR.COM> eeh@public.BTR.COM (Eduardo E. Horvath eeh@btr.com) writes: >What is the reason for FreeRemeber(FALSE) ? There isn't a very good reason for it. The best reason I can give is based on the way OpenWindow() and OpenScreen() use AllocRemember. Using AllocRemember() allows for easy freeing in case of an allocation failure. Then, when the window or screen or whatever succeeds, FreeRemember(FALSE) is called, which increases the amount of memory available. Of course, it makes freeing the window or screen at CloseWindow()/CloseScreen() time more complex, and it frags memory. So there's not really much use, but remember, the first Amigas shipped with 256K of RAM on board, and they were originally going to have 128K on board, so all those little headers did add up to something. >Eduardo Horvath eeh@btr.com Peter -- Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com My opinions do not necessarily represent the opinions of my employer. "If all you have is a hammer, everything looks like a nail."