Path: utzoo!attcan!uunet!pdn!boake2!jc3b21!fgd3 From: fgd3@jc3b21.UUCP (Fabbian G. Dufoe) Newsgroups: comp.sys.amiga Subject: Re: Memory Fragmentation, looking for compaction Message-ID: <598@jc3b21.UUCP> Date: 12 Mar 89 17:35:08 GMT References: Distribution: comp Organization: St. Petersburg Jr. College, FL Lines: 37 From article , by sdk@surya.cs.ucla.edu (Scott D Kalter): > > > I have an application (SBProlog) that needs to allocate large blocks > of continuous memory. Unfortunately, I need do very little work > before my 2meg expansion memory fragments too much for this > application to be run. I have quickly looked through the fish disk > collection and found a program that could summarize the fragmentation > but did not see anything that could perform a compaction. > > Does anyone know of such a utility? > > Thanks, > > -Scott Kalter I've spent quite a bit of time recently looking at the Amiga's memory management. I don't believe there is any way to write a utility to compact memory. When you allocate memory AmigaDOS revises the system memory free list so the allocated blocks don't appear. When you release that memory AmigaDOS puts it back in the memory free list. If you put it all back the free memory won't be fragmented. AmigaDOS merges any contiguous chunks of free memory into a single chunk. So long as some memory remains allocated the free memory will be fragmented. Why can't you move the allocated blocks together so the free memory will all be contiguous? Because AmigaDOS doesn't know what processes have the allocated memory or what they are using it for. If you were to write a program to compact free memory you would need to know, for each allocated block you moved, every place in the system that had a pointer to that block so you could revise the pointer. --Fabbian Dufoe 350 Ling-A-Mor Terrace South St. Petersburg, Florida 33705 813-823-2350 UUCP: ...uunet!pdn!jc3b21!fgd3