unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: mmap visited files?
       [not found] ` <x7zo27v0r2.fsf@capsicum.wsrcc.com>
@ 2002-02-19 21:30   ` Richard Stallman
  2002-02-21 21:46     ` Ken Raeburn
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Stallman @ 2002-02-19 21:30 UTC (permalink / raw)
  Cc: emacs-devel

    I use mmap-ed data files in my gps-mapping program and there is
    another big win if one plays one's cards right: free autosaves.  In my
    case I temporarily append stuff to the end of the mmap-ed file.  If
    the program crashes, the data in the mmaped buffers still gets flushed
    to the underlying disk file by the OS.  It sure beats complex autosave
    logic.  It might be worth trying a similar hack for emacs -- mmap the
    single-gap buffer directly into a temporary file.

This might possibly be a good idea.  It could not replace the current
auto-save feature, because the mmap'd file would have a gap in it and
it would not be possible to record where that is.  Also, the pages may
not necessarily be saved at the same time.  So it would take hand
editing to use this file for recovery.  But it might be useful
nonetheless.

The question is how much additional value this would give beyond the
existing auto save feature.  Maybe not much.

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mmap visited files?
  2002-02-19 21:30   ` mmap visited files? Richard Stallman
@ 2002-02-21 21:46     ` Ken Raeburn
  0 siblings, 0 replies; 2+ messages in thread
From: Ken Raeburn @ 2002-02-21 21:46 UTC (permalink / raw)


There's a risk with using mmap: If the file is truncated for some
reason, the mapped pages may no longer be useable, and references to
them may crash the program.  (I investigated this a little while I was
working on binutils.)  Perhaps that wouldn't happen often, but
deleting autosave files to gain a little bit of space on a nearly-full
file system does happen....

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-02-21 21:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20020218004118.700.qmail@brouhaha.com>
     [not found] ` <x7zo27v0r2.fsf@capsicum.wsrcc.com>
2002-02-19 21:30   ` mmap visited files? Richard Stallman
2002-02-21 21:46     ` Ken Raeburn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).