Re: Is Global Memory accessible in FRAMEWORKS ?
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