Mail Archives: djgpp/2000/09/26/11:45:16
Edmund Horner <ejrh AT paradise DOT net DOT nz> wrote:
> Can the mmap() function be implemented in the DJGPP libc?
mmap(), originally, is not a libc feature, but provided by the system.
DPMI doesn't provide this feature, AFAIK, so we'ld have to simulate
it. The problem with such a simulation is that it would lose all the
positive effects of mmap(), compared to straight-forward file I/O,
which originally made it a good idea on Unix. We have no alternative
to just doing the file I/O, in order to emulate mmap(), killing any
advantage it may have.
I.e., even if it is possible to simulate mmap(), DJGPP might very well
be better off without it, forcing applications to use their own
alternatives meant for mmap()-less systems.
> If so, would it be a simple port from, say, the Linux glibc source, or would
> it (as I suspect) involve a lot of fiddling with DPMI?
Linux glibc wouldn't help a bit. mmap() is a system call, by nature,
i.e. the source to copy from would be the kernel, not the libc.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -