Thread: mmap()

  1. #1
    Registered User PutoAmo's Avatar
    Join Date
    Mar 2002
    Posts
    72

    mmap()

    Hi,

    What does mapping mean? Does the mmap() function just copy the contents of a file into the calling processīs address space?

    This is just a language problem. I donīt know what mapping mean.

    Thanks in advance

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    SYNOPSIS
    #include <sys/mman.h>

    #ifdef _POSIX_MAPPED_FILES

    void * mmap(void *start, size_t length, int prot , int
    flags, int fd, off_t offset);

    int munmap(void *start, size_t length);

    #endif

    DESCRIPTION
    The mmap function asks to map length bytes starting at
    offset offset from the file (or other object) specified by
    the file descriptor fd into memory, preferably at address
    start. This latter address is a hint only, and is usually
    specified as 0. The actual place where the object is
    mapped is returned by mmap, and is never 0.
    More data in the rest of the manpage

  3. #3
    Registered User PutoAmo's Avatar
    Join Date
    Mar 2002
    Posts
    72
    Thank you, vVv. Good example

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. mmap program
    By karthigayan in forum C Programming
    Replies: 1
    Last Post: 04-01-2009, 04:38 AM
  2. BSD mmap for shared memory - am I right?
    By sean in forum Linux Programming
    Replies: 21
    Last Post: 03-09-2009, 01:57 PM
  3. using mmap for copying large files
    By rohan_ak1 in forum C Programming
    Replies: 6
    Last Post: 05-13-2008, 08:12 AM
  4. write a word to file by using lseek and mmap
    By SoFarAway in forum C Programming
    Replies: 1
    Last Post: 03-28-2005, 01:33 PM
  5. mmap() function - Linux
    By mattbrrtt in forum Linux Programming
    Replies: 0
    Last Post: 08-09-2003, 07:04 AM