WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] libxc portability fixes

To: "Vincent Hanquez" <vincent@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxc portability fixes
From: "Christoph Egger" <Christoph.Egger@xxxxxxx>
Date: Wed, 19 Sep 2007 17:04:35 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 19 Sep 2007 08:09:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070919144949.GA7154@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200709191519.37628.Christoph.Egger@xxxxxxx> <200709191632.59288.Christoph.Egger@xxxxxxx> <20070919144949.GA7154@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
On Wednesday 19 September 2007 16:49:49 Vincent Hanquez wrote:
> On Wed, Sep 19, 2007 at 04:32:59PM +0200, Christoph Egger wrote:
> > MAP_ANONYMOUS is the proprietary thing.
>
> which "proprietary thing" ?
>
> > The glibc people
> > should know that and should deprecate MAP_ANONYMOUS instead.
>
> solaris has deprecated MAP_ANON as well.

Oh, SystemV Unix has MAP_ANONYMOUS?
BSD-Unix only has MAP_ANON.

> > They should also document that the fd argument must be
> > -1 when MAP_ANON is specified to match the Unix behaviour.
>
> ----------
> MAP_ANONYMOUS
>
> The mapping is not backed by any file; its contents are initial‐
> ized to zero.  The fd and offset arguments are ignored; however,
> some implementations require fd to be -1  if MAP_ANONYMOUS  (or
> MAP_ANON)  is specified, and portable applications should ensure
> this.  The use of MAP_ANONYMOUS in conjunction  with MAP_SHARED
> is only supported on Linux since kernel 2.4.
> ----------
>
> what are you missing from this ?

My linux mmap manpage says:
---------------------------
       MAP_ANONYMOUS
              The  mapping  is not backed by any file; the fd and offset argu-
              ments are ignored.  The use of this  flag  in  conjunction  with
              MAP_SHARED is only supported on Linux since kernel 2.4.

       MAP_ANON
              Alias for MAP_ANONYMOUS.  Deprecated.
---------------------------

My bsd mmap manpage says:
-------------------------------
     MAP_ANON            Map anonymous memory not associated with any specific
                         file.  The file descriptor is not used for creating
                         MAP_ANON regions, and must be specified as -1.  The
                         mapped memory will be zero filled.
-------------------------------


Christoph


-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel