Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!liuida!isy!lysator.liu.se!zap From: zap@lysator.liu.se (Zap Andersson) Newsgroups: comp.sys.amiga.programmer Subject: Re: Exec memory allocation Message-ID: <520@lysator.liu.se> Date: 28 Feb 91 15:32:19 GMT References: <1991Feb28.135502.933@kth.se> Sender: news@isy.liu.se (Lord of the News) Organization: Lysator Computer Club, Linkoping University, Sweden Lines: 35 d85-jmh@nada.kth.se (Jan-Olof Hendig) writes: >I have a few questions regarding how exec handles memory allocation. >1/ According to the 1.3 RKM exec maintains a linked list where all free regions in > the system are listed. When the system gets more fragmented this list must grow in > size. My question is simply this, how does exec allocate space for the list nodes > in the free memory list? For all I know, the memory free list is in free memory! I.e. each free block begins with two longwords, the first pointing to the next free block, and the next describing the size of this block (or vice verca). This is why you can never allocate less than 8 bytes! >2/ What kind of allocation strategy does exec use? First fit? Best fit? I think it takes first that's big 'nuff... >Thankful for answers to these stupid questions. Yer welcome, chummer! >Jan-Olof Hendig (d85-jmh@nada.kth.se) -- * * * * * * * * * * * * * * * * * (This rent for space) * My signature is smaller than * Be warned! The letter 'Z' is Copyright 1991 * yours! - zap@lysator.liu.se * by Zap Inc. So are the colors Red, Green and * * * * * * * * * * * * * * * * * Greenish-yellow (Blue was taken by IBM) -- * * * * * * * * * * * * * * * * * (This rent for space) * My signature is smaller than * Be warned! The letter 'Z' is Copyright 1991 * yours! - zap@lysator.liu.se * by Zap Inc. So are the colors Red, Green and * * * * * * * * * * * * * * * * * Greenish-yellow (Blue was taken by IBM)