Mail Archives: djgpp/2000/07/04/16:45:24
Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> writes:
> On Tue, 04 Jul 2000 19:01:48 +0200, "Eli Zaretskii"
> <eliz AT is DOT elta DOT co DOT il> wrote:
>
> >> Date: Tue, 4 Jul 2000 21:17:57 +0600 (LKT)
> >> From: Kalum Somaratna aka Grendel <kalum AT lintux DOT cx>
> >>
> >> "It will probably port to any ANSI/POSIX system that provides mmap(), and
> >> mprotect(), as long as mprotect() has the capability to turn off all
> >> access to a memory page, and mmap() can use /dev/zero or the MAP_ANONYMOUS
> >> flag to create virtual memory pages."
> >>
> >> What does this /dev/zero mean
> >
> >/dev/zero is a device reading from which yields zeroes. You can read
> >as many zero bytes as you need for than device.
>
> And, unlike most character devices, /dev/zero can also be mmap()ed
> like a file and is an alternate way of allocating memory.
Yes. You can replace the mmap with valloc or something similar that
allocates memory in pages (i.e. 4K multiples on a 4K boundary).
--
Nate Eldredge
neldredge AT hmc DOT edu
- Raw text -