Thread: mmap

  1. #1
    Registered User
    Join Date
    Nov 2006



    I need to mmap a file so that I can grow and shrink it as needed. In addition to using mremap, the actual file size needs to be modified as well. I do not know how to change the file size, but i've been told to seek past the end of the file. Does any know how to solve this problem?

    I open the file with open function.

    Thanks for any help.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    For some things, I guess you have to use the fd you got when you opened the file in the first place.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

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