On Thu, Nov 28, 2013 at 8:21 PM, Gregor Best <g...@ring0.de> wrote:
>> [...]
>> anon = (char*)mmap(NULL, 4096, PROT_READ|PROT_WRITE,
>>               MAP_ANON|MAP_SHARED, -1, 0);
>>
>> that probably means it may not be that portable after all. Thanks for
>> making me aware of it in any case.
>> [...]
>
> *BSD has it, and one of the Gentoo machines I have access to has it too,
> and so does an Ubuntu server for work. Manpages on all machines contain
> at least a small paragraph about anonymous mappings and both mention
> that fd should be -1 in that case.  Looks portable enough.

Turns out I was looking at the wrong section. The mmap (3p) man page
does not mention it (since it's not a POSIX conform function), but
mmap (2) does. My bad.

Reply via email to