• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: appending to a memory-mapped file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: appending to a memory-mapped file


  • Subject: Re: appending to a memory-mapped file
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 6 Jan 2010 15:26:13 -0800

On Jan 6, 2010, at 1:39 PM, Jean-Daniel Dupas wrote:

> Just an idea, you can try to remap the same file with a larger size at the same address than the previous one using the MAP_FIXED flag. According to the man page, if you pass this flag, mmap try to "remove a mapping that already exists at that location". So it will automatically invalidate your previous mapping and create a new one with the new range (if there is enough room to do this of course, else it will failed).

It doesn't fail if there's not enough room; it just wipes out any other mappings that overlapped the address range. When I tried doing this, it ended up overwriting a large malloc zone, which caused some exciting and hard-to-debug crashes. :-(

—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >appending to a memory-mapped file (From: Joel Reymont <email@hidden>)
 >Re: appending to a memory-mapped file (From: Jens Alfke <email@hidden>)
 >Re: appending to a memory-mapped file (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: appending to a memory-mapped file
  • Next by Date: Kextload bus error on PowerPC
  • Previous by thread: Re: appending to a memory-mapped file
  • Next by thread: Kextload bus error on PowerPC
  • Index(es):
    • Date
    • Thread