Xref: utzoo comp.editors:1246 gnu.emacs:2101 comp.unix.wizards:20040 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!wuarchive!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.editors,gnu.emacs,comp.unix.wizards Subject: Mach and faulting in the file (Re: GNU Emacs, memory usage, releasing) Message-ID: <2J+IH7ggpc2@ficc.uu.net> Date: 7 Jan 90 20:05:37 GMT References: <1558@aber-cs.UUCP> <129799@sun.Eng.Sun.COM> <50359@bbn.COM> Reply-To: peter@ficc.uu.net (Peter da Silva) Organization: Xenix Support, FICC Lines: 32 Note: faulting in the file is equivalent to RED's technique of only reading in the part of the file being used... > Given an appropriate system architecture, such as Mach, you could > even fault your blocks in from the file! > Mach doesn't do object (structure) paging to my knowledge. What I mean here is that you can allocate your block poimters, then call map_fd to map the file into memory. Now you point your block pointers into the file, but don't actually touch the memory. Now when you need a block, you just touch it, and it'll get faulted in from the file. I'm sure there are editors on friendlier VM systems than UNIX (such as Multics or VMS) that already do something like this. > 3> Allow the program to change the page mapping (think of it as mmap > to your own addess space). Then when you open a gap, you always > copy at most one page; you just split the page on which the gap > apears into two and translate the pages above or below by one. THAT is the thing to do to "fix" buffer gap. If you can do that you can also call map_fd to get the initial buffer. The problem with this is that now the program (or its custom external pager) is having to do much of the work of a block-splitting algorithm. Are there any major systems that give this capability? Mach could, but I hear external pagers aren't working very well yet. > You've already got paging hardware; why not use it to your advantage? Likewise. Buffer gap dirties a lot of memory, over & over again. -- _--_|\ Peter da Silva. +1 713 274 5180. . / \ Also or \_.--._/ v "Have you hugged your wolf today?" `-_-'