Article View: comp.editors
Article #3709Mach and faulting in the file (Re: GNU Emacs, memory usage, releasing)
From: Peter da Silva
Date: Sun, 07 Jan 1990 20:05
Date: Sun, 07 Jan 1990 20:05
37 lines
2334 bytes
2334 bytes
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. <peter@ficc.uu.net>.
/ \ Also <peter@ficc.lonestar.org> or <peter@sugar.lonestar.org>
\_.--._/
v "Have you hugged your wolf today?" `-_-'
Technical Details
Message-ID:
<2J+IH7ggpc2@ficc.uu.net>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!wuarchive!texbell!sugar!ficc!peterReferences:
<1558@aber-cs.UUCP> <129799@sun.Eng.Sun.COM> <50359@bbn.COM> <IN_S4Eggpc2@ficc.uu.net> <GUMBY.90Jan6045022@Gang-of-Four.Stanford.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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> <IN_S4Eggpc2@ficc.uu.net> <GUMBY.90Jan6045022@Gang-of-Four.Stanford.EDU> Reply-To: peter@ficc.uu.net (Peter da Silva) Organization: Xenix Support, FICC Lines: 32