[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [5778] Use MAP_ANON also for FreeBSD (Juergen Lock)
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [5778] Use MAP_ANON also for FreeBSD (Juergen Lock) |
Date: |
Sun, 23 Nov 2008 13:00:43 +0100 |
User-agent: |
Mutt/1.3.28i |
On Sun, Nov 23, 2008 at 10:03:10AM +0000, Jamie Lokier wrote:
> Blue Swirl wrote:
> > -#ifdef __OpenBSD__ /* no need (?) for a dummy file on OpenBSD */
> > +/* no need (?) for a dummy file on OpenBSD/FreeBSD */
> > +#if defined(__OpenBSD__) || defined(__FreeBSD__)
> > int map_anon = MAP_ANON;
> > #else
> > int map_anon = 0;
>
> How about, simply:
>
> #ifdef MAP_ANON
>
> (Btw, on some OSes it has the name MAP_ANONYMOUS, so in my own
> portable code I look for both.)
I'm pretty sure there are OSes around that have MAP_ANON/MAP_ANONYMOUS
but don't support it in combination with MAP_SHARED.