Multiple links to shared memory segments

From: James Galbraith (galbja_at_inel.gov)
Date: 02/05/04


Date: 5 Feb 2004 11:43:23 -0800

Hi,
I've been migrating some software developed under Linux, Solaris, and
SGI to one of our HP platforms and have run into a roadblock. I've
got a few objects that each need to attach to the same shared memory
segment. I'm using the POSIX shm_open() and mmap() functions. The
first attach completes OK, with all following attaches failing with
the dreaded ENOMEM error. This is documented in the man pages,
indicating that HPUX is unable to support multiple links to a single
shared memory segment to to the memory architecture. It continues to
indicate that if the mmap call is modified to use the MAP_VARIABLE
option and let the OS determine the location it is mapped, all will be
OK. Well, it isn't. I've tried the method(s) indicated in the man
page and continue to have problems.

Has anyone out there had any success utilizing multiple links to a
shared memory segment using the POSIX functions?? If so, I would
greatly appreciate hearing about your solution so I can get my porting
on track.

I'd like to stay away from creating global pointers for the obvious
reasons. Besides my objects are all template based and creating
shared-memory-specific pointers would be a problem.

Thanks

James Galbraith
Idaho National Engineering and Environmental Laboratory
galbja@inel.gov



Relevant Pages

  • Re: Multiple links to shared memory segments
    ... |got a few objects that each need to attach to the same shared memory ... I'm using the POSIX shm_openand mmap() functions. ... |shared memory segment to to the memory architecture. ...
    (comp.sys.hp.hpux)
  • operating system limit was reached
    ... 17:36:56 Requested shared memory segment size rounded from 116736KB to ... 08:56:16 Dynamically allocated new virtual shared memory segment (size ... allocate shared memory because an operating system limit was reached ...
    (comp.databases.informix)
  • Re: operating system limit was reached
    ... 17:36:56  Requested shared memory segment size rounded from 116736KB to ... 08:56:16  Dynamically allocated new virtual shared memory segment (size ... allocate shared memory because an operating system limit was reached ...
    (comp.databases.informix)
  • Problems accessing shared memory
    ... create or access the shared memory segment on a specific computer. ... The problem also appeared on a system using Windows 2003 server and Windows ... but we found a fix. ...
    (microsoft.public.dotnet.framework.interop)
  • RE: operating system limit was reached
    ... operating system limit was reached ... It's either the number of shared memory segments per process or the ... 17:36:56 Requested shared memory segment size rounded from 116736KB to ... 08:56:16 Dynamically allocated new virtual shared memory segment (size ...
    (comp.databases.informix)