[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mmap - MAP_ANON ??



On Sat, Apr 14, 2001 at 09:29:02PM -0500, Lance Heller wrote:
>>    While the 'mmap(2)' manpage of my x86 2.2r2 (2.2.18 kernel) 
>> system says "Linux also knows about MAP_DENYWRITE,  MAP_EXECUTABLE 
>> and MAP_ANON(YMOUS)", I've not been able to get 'MAP_ANON' to work.  
>> For example the mmap call below returns an EINVAL:
>> [...]
>> This builds cleanly using gcc version 2.95.2 and libc6 
>> version 2.1.3-18.  ( gcc -Wall -g junk.c )
>> 
>> Any help, pointers or suggestions will be gratefully accepted.

On Sat, Apr 14, 2001 at 11:40:13PM -0400, Matt Zimmerman wrote:
> FWIW, this code works fine on my system (x86, Debian unstable, kernel 2.4.2).

MAP_ANON(YMOUS) is not implemented in 2.2.x AFAIK. I've had to recompile
a couple of things that do this and barf against 2.2.x headers (esp.
tftpd-hpa so it would succeed in pxebooting the gf's diskless box).
I've been having fun with hex editors lately, and that might be a
faster approach to fixing the troubles as they arise, at least until
I move to 2.4.x.


Cheers,
Bill



Reply to: