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: [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: Fri, 16 Jun 2006 16:15:46 -0500

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;
 

  • Follow-Ups:
    • Re: [Wireshark-dev] Use of MAP_ANON in epan/emem.c
      • From: Jaap Keuter
  • Prev by Date: Re: [Wireshark-dev] Problem with MIME type on Windows platform
  • Next by Date: Re: [Wireshark-dev] Problem with MIME type on Windows platform
  • Previous by thread: Re: [Wireshark-dev] Problems With User's Guide
  • 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