Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!bacchus.pa.dec.com!granite.pa.dec.com!mwm From: mwm@raven.pa.dec.com (Mike (My Watch Has Windows) Meyer) Newsgroups: comp.sys.amiga.tech Subject: Re: Files larger than available memory. Message-ID: Date: 25 Sep 90 23:08:52 GMT References: <924@ucsvc.ucs.unimelb.edu.au> <1990Sep23.174736.16118@lavaca.uh.edu> <83986@tut.cis.ohio-state.edu> <14646@cbmvax.commodore.com> Sender: news@wrl.dec.com (News) Organization: Missionaria Phonibalonica Lines: 40 In-Reply-To: daveh@cbmvax.commodore.com's message of 25 Sep 90 20:20:25 GMT I've just started poking at this, because one of the changes to mg3 before the release is going to be ditching the linked list of lines in favor of a buffer gap editor. Making the editor page to disk after this is done would be simple, but it's not clear even that's worth the trouble. For those not familiar with it, the idea behind a buffer gap editor is to keep all the text in one contiguous chunk, with a single gap where editing is going on. Text is inserted into the gap; deleted text is added to the gap, and the gap is shuffled around as needed (there's a multiple-gap variation I haven't thought about yet, but will). With memory mapping of some kind, doing everything in memory requires a contiguous chunk of memory as big as the file. This is clearly unacceptable on the Amiga, especially for an editor like mg. The solution is a "paged" buffer, where the file buffer is a linked list of pages, each of a fixed size (or each with a gap...hmmmm). Given that structure, the only thing that needs to happen to be able to edit files larger than memory is choosing a place to store the pages that aren't in memory at the time, and adding the simple code to page things to/from disk. The obvious "tmp" place is ram, which doesn't buy anything. Likewise, paging to floppy doesn't buy much. I tend to agree with Dave - with a 1 meg nominal minimum machine, and those with hard disks probably having more, there's not much reason to want to page to disk, and the space/time spent on that code can probably be put to better use. Anyone have any comments?