Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!sun!imagen!atari!portal!cup.portal.com!dan-hankins From: dan-hankins@cup.portal.com Newsgroups: comp.sys.amiga.tech Subject: Re: free memory defragmentation Message-ID: <10003@cup.portal.com> Date: 13 Oct 88 01:12:04 GMT References: <9887@cup.portal.com> <3009@amiga.UUCP> Organization: The Portal System (TM) Lines: 26 XPortal-User-Id: 1.1001.5361 In article <3009@amiga.UUCP> jimm@amiga.UUCP (Jim Mackraz) writes: >By the way: memory fragmentation on the Amiga occurs because there are >actually allocated sections of memory between the freed chunks. There's >been a lot of discussion on this already. > >Note that you can't concatenate two non-adjacent chunks. Ah. So what we need is an MMU (i.e. virtual memory). Hmmm. What would happen if the ALLOCATE and DEALLOCATE functions were re-written in such a way that all memory would be allocated in 1k chunks? Then successive calls to ALLOCATE would check to see if part of an already-allocated chunk was available for allocation, and use that if it could. That is, first call (100 bytes) results in a 1k chunk being allocated. Second call results in a second pointer into the same 1k chunk. This might reduce the problem you spoke of without as much need to resort to an MMU. If we could keep track of all pointers to a memory chunk, we could rearrange them no problem. But then the Amiga OS isn't quite *that* object-oriented. Dan Hankins