Wireshark-dev: Re: [Wireshark-dev] Use of MAP_ANON in epan/emem.c

Date: Fri, 16 Jun 2006 17:25:31 -0500
On Fri, Jun 16, 2006 at 11:32:32PM +0200, Jaap Keuter wrote:
> Checked in.

Thanks. What do we do for IRIX which has neither MAP_ANONYMOUS or
MAP_ANON? #define MAP_ANONYMOUS to 0 in this case?

> Thanx,
> Jaap
> 
> On Fri, 16 Jun 2006, Albert Chin wrote:
> 
> > HP-UX doesn't have MAP_ANON but it does have MAP_ANONYMOUS. Moreoever,
> > according to mmap(2) on RHEL:
> >        MAP_ANONYMOUS
> >               The mapping is not backed by any file; the fd and offset argu-
> >               ments are ignored.  This flag in conjunction with MAP_SHARED is
> >               implemented since Linux 2.4.
> >
> >        MAP_ANON
> >               Alias for MAP_ANONYMOUS. Deprecated.
> >
> > --
> > albert chin (china@xxxxxxxxxxxxxxxxxx)
> >
> > -- snip snip
> > Index: epan/emem.c
> > ===================================================================
> > --- epan/emem.c	(revision 18485)
> > +++ epan/emem.c	(working copy)
> > @@ -288,7 +288,7 @@
> >
> >  #elif defined(USE_GUARD_PAGES)
> >  		npc->buf = mmap(NULL, EMEM_PACKET_CHUNK_SIZE,
> > -			PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);
> > +			PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
> >  		g_assert(npc->buf != MAP_FAILED);
> >  		buf_end = npc->buf + EMEM_PACKET_CHUNK_SIZE;
> >
> > _______________________________________________
> > Wireshark-dev mailing list
> > Wireshark-dev@xxxxxxxxxxxxx
> > http://www.wireshark.org/mailman/listinfo/wireshark-dev
> >
> 
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
> 
> 

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)