Re: Multiple links to shared memory segments
From: Mike Stroyan (stroyan_at_hpstryn.fc.hp.com)
Date: 02/05/04
- Previous message: James Galbraith: "Multiple links to shared memory segments"
- In reply to: James Galbraith: "Multiple links to shared memory segments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 05 Feb 2004 20:49:21 GMT
James Galbraith <galbja@inel.gov> wrote:
|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.
Showing more details would make it easier to see what has gone
wrong. The tusc system call tracer can be very helpful for examining
what got mapped where before an error occured. It is available from
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.5/
Try to map the full range of a shared file or shared memory object
every time you mmap it. That will make sure it is placed in an address
range that has room for mapping ranges that you might be looking for
later. Also avoid munmap before all uses are complete.
The HP-UX 11.23 release for Itanium based systems adds a
"ld +as mpas" option that allows shared memory to have more than one
mapping. You would need a new Itanium based system like a zx2000 or
zx6000 to use that release. The new feature is described in
http://h21007.www2.hp.com/dspp/files/unprotected/Itanium/aas_white_paper.pdf
-- Mike Stroyan, mike.stroyan@hp.com
- Previous message: James Galbraith: "Multiple links to shared memory segments"
- In reply to: James Galbraith: "Multiple links to shared memory segments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|