• 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: Shared Memory and Distributed Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared Memory and Distributed Objects


  • Subject: Re: Shared Memory and Distributed Objects
  • From: Dan Bernstein <cocoa-dev%email@hidden>
  • Date: Sun, 9 Mar 2003 10:31:44 +0200

Finally solved: mmap() will accept an fd from shm_open(), but one has to ftruncate() that fd to (at least) the required amount of memory prior to calling mmap() (this has to be done with normal filesystem fds as well), which I've neglected to do.

I figured it out by browsing the kernel sources. Neglecting to mention this possible reason for an EINVAL errno from mmap() is clearly a bug in the documentation.

-- Dan

On Sunday, February 16, 2003, at 10:00 PM, Kaelin Colclasure wrote:

On Sunday, February 16, 2003, at 03:37 AM, Dan Bernstein wrote:
1. Using a shared memory object, opened with shm_open() and mapped with mmap().
Problem: no matter what I did, I couldn't get mmap() to accept the fd shm_open() had returned.

mmap() is not used with System V shared memory objects (AFAIK). The fd mmap() wants is a normal filesystem file handle.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: inverse of displayNameAtPath:
  • Next by Date: Re: [newbie] Updating an NSProgressIndicator in a for loop
  • Previous by thread: inverse of displayNameAtPath:
  • Next by thread: Adorning Pages
  • Index(es):
    • Date
    • Thread