Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!overload!dillon From: dillon@overload.Berkeley.CA.US (Matthew Dillon) Newsgroups: comp.sys.amiga.programmer Subject: Re: Memory fragging Message-ID: Date: 23 May 91 01:20:48 GMT References: <1991May21.195251.16477@zorch.SF-Bay.ORG> Organization: Not an Organization Lines: 45 In article <1991May21.195251.16477@zorch.SF-Bay.ORG> mike@zorch.SF-Bay.ORG (Mike Smithwick) writes: >[Attack of the killer poodles!] > >I am using loads of chip ram and it seems to be fragging pretty badly. So much >so that I can't run the program more than a couple of times without having >to reboot. I am not running any other programs at the same time so there is >no outside interference. Theoretically I should return to the same state >as I had before, I am not. > >Any ideas? > >mike >-- >"There is no problem to big that can't be solved with high explosives"-Rush > >Mike Smithwick - ames!zorch!mike You are absolutely right. If you return all resources and free all memory (that you allocated :-)) you should wind up in basically the original state as far as memory fragmentation goes. Two common problems: (1) your program has side effects, such as creating RAM: files, that leaves memory fragmented. (2) you are not FreeMem()ing all the memory you allocated --- easiest to simply run 1> Avail After each program run (keep in mind that the first time the program is run might have side effects re: external libraries it may open which stick around). Avail should return the same amount of memory free. -Matt -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA