> [...]
> 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.
--
Gregor Best
--
And on the seventh day, He exited from append mode.
Received on Thu Nov 28 2013 - 20:21:20 CET