• 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
mmap and munmap question/problem (under iOS, proably no important)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mmap and munmap question/problem (under iOS, proably no important)


  • Subject: mmap and munmap question/problem (under iOS, proably no important)
  • From: David Hoerl <email@hidden>
  • Date: Sat, 04 Feb 2012 10:14:29 -0500

I have a huge file with which I use mmap to bring in selected pieces. When done, I then munmap the piece.

However, my code is threaded, and I am getting crashes which I **believe** at this moment to be related to munmap. Specifically, if two threads map pieces in which overlap, the first munmap appears to unmap the area used by the second thread, and boom, down goes my app.

If I'm correct in this assumption, then it occurred to me that if I could chunk my memory such that no two pieces would appear on the same page, the problem would go away. The only other alternative I've thought of is just queuing all munmap calls until such time that all threads finish.

Sooo - is there better solution to the above. I've used mmap before, but am no expert by any means!

Thanks for any suggestions or comments!

David
_______________________________________________
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


  • Follow-Ups:
    • Re: mmap and munmap question/problem (under iOS, proably no important)
      • From: Daniel Vollmer <email@hidden>
    • Re: mmap and munmap question/problem (under iOS, proably no important)
      • From: Derrick Brashear <email@hidden>
  • Prev by Date: Re: identifying optical media
  • Next by Date: Re: mmap and munmap question/problem (under iOS, proably no important)
  • Previous by thread: Re: identifying optical media
  • Next by thread: Re: mmap and munmap question/problem (under iOS, proably no important)
  • Index(es):
    • Date
    • Thread