Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

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

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Albert Chin <wireshark-dev@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 17 Jun 2006 00:26:11 -0500

On Fri, Jun 16, 2006 at 07:49:20PM -0700, Guy Harris wrote:
> 
> On Jun 16, 2006, at 6:11 PM, Guy Harris wrote:
> 
> > The IRIX 6.5 man page for /dev/zero indicates you can mmap it to get
> > anonymous pages.  Are there any UN*Xes we support that *don't* allow
> > you to mmap /dev/zero to get anonymous pages?
> 
> Yes - it appears that FreeBSD and OS X don't.
> 
> > if so, we might want to use MAP_ANONYMOUS on systems that
> > define it, otherwise use MAP_ANON on systems that define it (OS X
> > 10.4 defines MAP_ANON but *NOT* MAP_ANONYMOUS, and that seems to be a
> > general BSD characteristic - I don't find any definitions of
> > MAP_ANONYMOUS in the sys/sys source directory of fairly recent
> > {Free,Net,Open}BSD), otherwise use "/dev/zero".
> 
> I've checked in a change to do that.  It allows Wireshark to build on  
> OS X (the change of MAP_ANON to MAP_ANONYMOUS probably broke  
> {Free,Open,Net,DragonFly}BSD builds as well), and it includes  
> untested code to handle systems that have neither MAP_ANONYMOUS nor  
> MAP_ANON - it assumes they have /dev/zero, opens that, and maps it.

Thanks. I backported your change to ethereal 0.99.0 and it seems to
work ok.

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)

  • References:
    • [Wireshark-dev] Use of MAP_ANON in epan/emem.c
      • From: Albert Chin
    • Re: [Wireshark-dev] Use of MAP_ANON in epan/emem.c
      • From: Jaap Keuter
    • Re: [Wireshark-dev] Use of MAP_ANON in epan/emem.c
      • From: Albert Chin
    • Re: [Wireshark-dev] Use of MAP_ANON in epan/emem.c
      • From: Guy Harris
    • Re: [Wireshark-dev] Use of MAP_ANON in epan/emem.c
      • From: Guy Harris
  • Prev by Date: Re: [Wireshark-dev] Use of MAP_ANON in epan/emem.c
  • Next by Date: [Wireshark-dev] AC_CHECK_HEADERS(iconv.h) but to check for iconv library
  • Previous by thread: Re: [Wireshark-dev] Use of MAP_ANON in epan/emem.c
  • Next by thread: Re: [Wireshark-dev] Use of MAP_ANON in epan/emem.c
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation