delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/26/11:45:16

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: C Library: mmap() function
Date: 26 Sep 2000 15:36:16 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 25
Message-ID: <8qqfpg$f04$1@nets3.rz.RWTH-Aachen.DE>
References: <969980620 DOT 314295 AT shelley DOT paradise DOT net DOT nz>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 969982576 15364 137.226.32.75 (26 Sep 2000 15:36:16 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 26 Sep 2000 15:36:16 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019