• 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: Is Global Memory accessible in FRAMEWORKS ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is Global Memory accessible in FRAMEWORKS ?


  • Subject: Re: Is Global Memory accessible in FRAMEWORKS ?
  • From: "Corey O'Connor" <email@hidden>
  • Date: Tue, 9 May 2006 14:26:24 -0700

On 5/9/06, Andrew Satori <email@hidden> wrote:
However, be forwarned that the default Shared Memory settings are
significantly lower in Mac OS X than they are in most variants of
Linux and Unix.

I've had great success with memory mapped shared memory objects to share a large buffer of memory between applications.

The general process I've used is:
1. Open an shared memory object using shm_open with an identifier that
is known to both applications.
2. Resize the shared memory object using ftruncate to the needed size
3. use mmap with MAP_SHARED to get a pointer to the memory.

Once I'm done with the memory:
1. Release the pointer with munmap
2. Release the shared memory object with shm_unlink

I think the MAP_ANON flag for mmap might be a more direct way to
implement this but I'm unsure how that works.

--
-Corey O'Connor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Is Global Memory accessible in FRAMEWORKS ? (From: "rohit dhamija" <email@hidden>)
 >Re: Is Global Memory accessible in FRAMEWORKS ? (From: "John C. Randolph" <email@hidden>)
 >Re: Is Global Memory accessible in FRAMEWORKS ? (From: Andrew Satori <email@hidden>)

  • Prev by Date: Re: Quit menu item undimming itself?!
  • Next by Date: Translucent Window and standard title buttons : is it possible ?
  • Previous by thread: Re: Is Global Memory accessible in FRAMEWORKS ?
  • Next by thread: How to include a framework in a custom IB Palette
  • Index(es):
    • Date
    • Thread