Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 49. Memory Mappings > Additional mmap() Flags

49.6. Additional mmap() Flags

In addition to MAP_PRIVATE and MAP_SHARED, Linux allows a number of other values to be included (ORed) in the mmap() flags argument. Table 49-3 summarizes these values. Other than MAP_PRIVATE and MAP_SHARED, only the MAP_FIXED flag is specified in SUSv3.

Table 49-3. Bit-mask values for the mmap() flags argument
ValueDescriptionSUSv3
MAP_ANONYMOUSCreate an anonymous mapping 
MAP_FIXEDInterpret addr argument exactly (Section 49.10)
MAP_LOCKEDLock mapped pages into memory (since Linux 2.6) 
MAP_HUGETLBCreate a mapping that uses huge pages (since Linux 2.6.32) 
MAP_NORESERVEControl reservation of swap space (Section 49.9) 
MAP_PRIVATEModifications to mapped data are private
MAP_POPULATEPopulate the pages of a mapping (since Linux 2.6)
MAP_SHAREDModifications to mapped data are visible to other processes and propagated to underlying file (converse of MAP_PRIVATE)
MAP_UNINITIALIZEDDon’t clear an anonymous mapping (since Linux 2.6.33) 



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial