emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using mmap on MS-Windows


From: Eli Zaretskii
Subject: Using mmap on MS-Windows
Date: Wed, 15 May 2013 17:04:07 +0300

The MS-Windows build of Emacs currently uses ralloc.c for allocation
of buffer memory, whereas most of the Posix platforms use mmap.  Using
ralloc.c has disadvantages, of which the most important and painful
one is that we must sometimes prevent buffer memory relocation when
xmalloc is called, and ralloc.c is not well equipped for such
situations, which at best leads to loss of free memory (and at worst
causes random crashes).

OTOH, it should be possible to implement mmap on Windows, at least for
the features that Emacs needs, judging by the mmap flags used by
Emacs.

Would someone please volunteer to work on converting the Windows port
to using mmap?  I can point to a couple of existing implementations of
mmap for Windows, which are GPL or PD, and so can be used at least as
starting points.  The goal would be to use mmap instead of ralloc.c
for buffer memory, and switch to the system malloc (instead of using
gmalloc.c) for all the other needs.

TIA



reply via email to

[Prev in Thread] Current Thread [Next in Thread]