- To: Penguinillas <slug@xxxxxxxxxxx>
- Subject: [SLUG] Re: Quick Unixy Q.
- From: Angus Lees <gusl@xxxxxxxxxxxxxxx>
- Date: Thu Nov 23 14:34:39 2000
- User-agent: Mutt/1.2.5i
\begin{James Morris}
> One example of usage is to allocate page-aligned memory by mmap()ing
> /dev/zero (see http://www.intercode.com.au/jmorris/rawutil/), instead of
> using the deprecated valloc() function.
on some unices (solaris?) that don't support MAP_ANON, you mmap /dev/zero
to get a chunk of memory that will be shared with your children (iirc)
(see APUE)
/dev/zero is sort of a /dev/null for input. being able to provide a file
of inexaustable zeroes is really good when you just want "some
input, but i don't care what"
/dev/full is one i've never managed to use tho (return "device is full"
on any write)
--
- Gus