Chris Scharver
2002-09-20 17:28:06 UTC
Hello,
I am working on porting a UNIX library to OS X, and the library depends
heavily on the use of SysV IPC shared memory and semaphores. Calls to
shmget() fail running on 10.2, and the only error I received was an
invalid argument error. I did some more tracking and determined that
there appears to be a size limit on just how much shared memory can be
allocated. It seems quite minimal, as my application only requests
about 10MB. Trying to call shmget() with much smaller sizes (1-2MB)
works okay.
It looks like I'll have to dive into some OS-specific memory details.
I'm not really sure where to get started since I had hoped that the new
SysV and IPC support in 10.2 would make things relatively easy. I need
to keep this as low-level as possible while trying to maintain as much
consistency with other platforms (namely IRIX, Linux, HP, and Sun).
Also, how can I try to clean up any shared memory segments that are
left around? There doesn't seem to be anything like ipcs or ipcrm
available. Any help or pointers in the right direction would be much
appreciated!
Thanks,
Chris
I am working on porting a UNIX library to OS X, and the library depends
heavily on the use of SysV IPC shared memory and semaphores. Calls to
shmget() fail running on 10.2, and the only error I received was an
invalid argument error. I did some more tracking and determined that
there appears to be a size limit on just how much shared memory can be
allocated. It seems quite minimal, as my application only requests
about 10MB. Trying to call shmget() with much smaller sizes (1-2MB)
works okay.
It looks like I'll have to dive into some OS-specific memory details.
I'm not really sure where to get started since I had hoped that the new
SysV and IPC support in 10.2 would make things relatively easy. I need
to keep this as low-level as possible while trying to maintain as much
consistency with other platforms (namely IRIX, Linux, HP, and Sun).
Also, how can I try to clean up any shared memory segments that are
left around? There doesn't seem to be anything like ipcs or ipcrm
available. Any help or pointers in the right direction would be much
appreciated!
Thanks,
Chris