Shared memory in OS X?

Ask a Question related to Mac Programming, Design and Development.

  1. #1

    Default Shared memory in OS X?

    I am porting an app from Classic to OS X...and the biggest problem I've run
    into is how to get live notification of changes to prefs.

    The app consists of a "daemon" and a preference-setter. The daemon is
    Mach-O, the preference-setter is written in Carbon.

    Right now, I just have the daemon continuously polling a file, which is not
    the best way to do it. Is there anyway for a Carbon app to instantly
    communicate with a Mach-O app? I'd prefer to avoid AppleEvents...

    Thanks!

    Mike Hunson

    Mike H. Guest

  2. Similar Questions and Discussions

    1. Shared Memory/Shared Buffers
      I have noticed that I can't set the shared buffers above 15512 which is exactly 128MB of RAM. Even if I set /proc/sys/kernel/shmmax above that,...
    2. Shared memory and Mac OS X
      The problem with not being able to set shmmax and shmall in a startup script in Mac OS X is not that you are setting them too late in the boot...
    3. Shared memory. Error.
      Hi, - When starting informix the following error appears: 12:52:14 Informix Dynamic Server 2000 Initialized -- Shared Memory Initialized....
    4. extended shared memory
      Hi, I do have a problem running my app cause it needs more than 11 shared memory segments, therefore I've set the env EXTSHM=ON according to the...
    5. I think I need a DB with no shared memory
      Whilst installing DBD::Informix, I encountered the following problem bash-2.03# esql -o esqlbasic esqlbasic.ec bash-2.03# ./esqlbasic...
  3. #2

    Default Re: Shared memory in OS X?

    On Mon, 29 Sep 2003, Mike H. wrote:
    > I am porting an app from Classic to OS X...and the biggest problem I've run
    > into is how to get live notification of changes to prefs.
    >
    > The app consists of a "daemon" and a preference-setter. The daemon is
    > Mach-O, the preference-setter is written in Carbon.
    >
    > Right now, I just have the daemon continuously
    >polling a file, which is not
    > the best way to do it. Is there anyway for a Carbon app to instantly
    > communicate with a Mach-O app? I'd prefer to avoid AppleEvents...
    For actual shared memory, there's always shmctl and friends, but for what
    you are trying to do CFMessagePort is probably more appropriate
    Or you could just send the daemon a signal telling it to reread its
    configuration file
    Why are you so hesitant to use apple events?

    Fred
    >
    > Thanks!
    >
    > Mike Hunson
    >
    >
    Frederick Cheung Guest

  4. #3

    Default Re: Shared memory in OS X?

    Mike H. <nospam@endspam.org> wrote:
    > I am porting an app from Classic to OS X...and the biggest problem I've run
    > into is how to get live notification of changes to prefs.
    >
    > The app consists of a "daemon" and a preference-setter. The daemon is
    > Mach-O, the preference-setter is written in Carbon.
    >
    > Right now, I just have the daemon continuously polling a file, which is not
    > the best way to do it. Is there anyway for a Carbon app to instantly
    > communicate with a Mach-O app? I'd prefer to avoid AppleEvents...
    Have a look-see: <http://makeashorterlink.com/?F5A413C06>

    Your best bet looks to be a Core Foundation distributed notification. A
    less Apple-oriented solution would be pipes or sockets, but those would
    still require polling the filesystem.
    Paul Mitchum Guest

  5. #4

    Default Re: Shared memory in OS X?

    In article <1g21w8l.16i6e0qzjuo6hN%usenet@mile23.com.r3m0v3 >,
    [email]usenet@mile23.com[/email].r3m0v3 (Paul Mitchum) wrote:
    > Mike H. <nospam@endspam.org> wrote:
    >
    > > I am porting an app from Classic to OS X...and the biggest problem I've run
    > > into is how to get live notification of changes to prefs.
    > >
    > > The app consists of a "daemon" and a preference-setter. The daemon is
    > > Mach-O, the preference-setter is written in Carbon.
    > >
    > > Right now, I just have the daemon continuously polling a file, which is not
    > > the best way to do it. Is there anyway for a Carbon app to instantly
    > > communicate with a Mach-O app? I'd prefer to avoid AppleEvents...
    >
    > Have a look-see: <http://makeashorterlink.com/?F5A413C06>
    >
    > Your best bet looks to be a Core Foundation distributed notification. A
    > less Apple-oriented solution would be pipes or sockets, but those would
    > still require polling the filesystem.
    I'll second Paul's suggestion. CFNotifications are the standard way to
    do this.

    -Eric

    --
    Eric Albert [email]ejalbert@stanford.edu[/email]
    [url]http://rescomp.stanford.edu/~ejalbert/[/url]
    Eric Albert Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139