Anita Kishore (kishore++at++electrogig.com)
Wed, 17 Jul 1996 10:43:23 -0700
I am facing some problems with shared arenas and IRIX IPC
when I link with several Performer related lib. Hope some of you
may be able to give an answer to it.
Framework:
We have two separate executables : one for handling UI (with
Inventor and Motif), second one for rendering using Performer2.0.1
on RE2, Irix 5.3. Both communicate through IRIX IPC - shared memory.
The first one does the foll:
- sets up the shared memory with:
usconfig( CONF_LOCKTYPE, US_NODEBUG );
arenaHandle = usinit(arenFileName);
- forks a process to make UI windows and interactions.
- forks another process which does:
usputinfo(arenaHandle, sharedStructPointer);
execlp("secondExecutable", "secondExecutable", arenFileName,
(char *) 0);
- waits for the two forked processes to complete.
The second executable does the foll:
- attach to shared arena already setup by first executable:
sharedHandle = usinit(argv[1]);
- get the shared struct pointer through usgetinfo
- set up Performer related rendering stuff.
Apart from linking with usual Inventor, X, Xm, pf ..etc libs., we also
use a database called "Illustra" and link with it.
Everything works fine with the above setup. The problem started when we
decided to remove Illustra.
Now, we no longer link with Illustra lib and I get the followng error:
In the second executable, usinit fails with the following messages
when I print errno and perror.
errno = 12, and perror gives: "Not enough space"
errno = 12 indicates that mmap has failed to map the
virtual address space of the shared arena on to the
data segment of the second executable.
I am confused by "Not enough space". To make the executable small,
I removed all Performer related stuff. So now, it only has the code to
do "usinit" and print the handle and errno.
When I don't link with any pf or non Pf lib., usinit succeeds. Then I
started to add pf lib one by one. It is Ok until :
-lpfdu${SRCLIBOPT} -lpfutil${SRCLIBOPT} -lpf${SRCLIBOPT}, in that order.
I need to link one more lib. which is my own pfiv lib. at :
-L${GIGRT_ARCH_LD} -lpfiv${SRCLIBOPT}
SRCLIBOPT=_igl
usinit fails when the last one is linked. pfiv is made out of the files:
pfiv.c++ and others that it needs. I don't use the libpfdb stuff.
I can't understand what is causing this failure. I don't know if it due to
the last lib "pfiv" or something else. Any help would be greatly appreciated.
FYI: If I have a single executable forking two processes to handle UI and
Performer, then it works fine with or without Illustra. But then, everything
is compiled with OpenGL.
Thanks for your patience to have read so far.
Hoping to get some help:
-anita
-------------------------------------------------------------
Anita Kishore
kishore++at++electrogig.com
-------------------------------------------------------------
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:11 PDT