Message49321
Logged In: YES
user_id=17929
quoting ubuntu's mmap man page:
MAP_ANONYMOUS
The mapping is not backed by any file; the fd and offset
arguments are ignored. This flag in conjunction with
MAP_SHARED is implemented since Linux 2.4.
MAP_ANON
Alias for MAP_ANONYMOUS. Deprecated.
---
On a glibc 2.1 system (once installed with a 2.2 kernel, now
running a 2.4 one) the manpage doesn't even mention
MAP_ANON(YMOUS).
The patch in it's current form will just fail on system's
not defining MAP_ANON (i.e. mmap will fail and an exception
will be raised).
However, according to Stevens 'Advanced Programming in the
Unix Environment', chapter 14.9, there are two ways to mmap
anonymous memory.
The first one works by using MAP_ANON (4.3+BSD),
and the second one works by opening /dev/zero and passing
that as a filedescriptor to mmap (SVR4).
So, I guess all BSD's and newer Linux Systems would work
with this version. Anyway I can send another patch handling
that case if you like?
|
|
Date |
User |
Action |
Args |
2007-08-23 15:45:19 | admin | link | issue1407135 messages |
2007-08-23 15:45:19 | admin | create | |
|