How to use Shared Memory ?

Mac OSX specific forum
Wolfram
Enthusiast
Enthusiast
Posts: 567
Joined: Thu May 30, 2013 4:39 pm

How to use Shared Memory ?

Post by Wolfram »

Can somebody give me an example how to build shared memory?
I want to send an integer between to programs. Or better to share a structure.
macOS Catalina 10.15.7
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: How to use Shared Memory ?

Post by wilbert »

Maybe you can use CFNotificationCenter ?
http://www.purebasic.fr/english/viewtop ... 19&t=68047
Windows (x64)
Raspberry Pi OS (Arm64)
Wolfram
Enthusiast
Enthusiast
Posts: 567
Joined: Thu May 30, 2013 4:39 pm

Re: How to use Shared Memory ?

Post by Wolfram »

wilbert wrote:Maybe you can use CFNotificationCenter ?
http://www.purebasic.fr/english/viewtop ... 19&t=68047
Hi Wilbert, I notes it already, but it it looks to complicated to me because I want to send a integer only and the CFNotificationCenter works with strings.
So every integer must be converted.

I hope there is an more efficient way.
macOS Catalina 10.15.7
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: How to use Shared Memory ?

Post by wilbert »

Wolfram wrote:I hope there is an more efficient way.
There are other ways; don't know if you like those better
http://nshipster.com/inter-process-communication/
Windows (x64)
Raspberry Pi OS (Arm64)
Post Reply