> "David S. Miller" <email@example.com> writes:
> > Date: Sun, 27 Sep 1998 03:49:04 +0200
> > From: Felix von Leitner <firstname.lastname@example.org>
> > I always get EINVAL :(
> > Shared anon pages are not supported. You can get similar
> > functionality from sysv ipc shared memory.
> Would it work if you create a scratch file, open it, unlink it, fill it
> to the right size with zeros and then map it with a shared mapping?
Yes, but you don't even need to fill it with zeros. Just use
ftruncate(fd, length). This has the advantage that unused blocks won't
These mappings have a big advantage over anonymous mappings too - you
can pass them around between processes using fd descriptor passing.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/