Re: Shared memory?
Rémi Arnaud (remi++at++remi.asd.sgi.com)
Tue, 27 May 1997 11:05:59 -0700 (PDT)
Bruno Rassaerts wrote:
>
> Amaury Aubel wrote:
>
> > Thanks for your hint but - alas - it is not the case.
> > To be accurate I have an array of structures. It used to be declared as
> > follows:
> >
> > MYSTRUCT *ModelList[NB_MAX];
> > with each element being pfMalloc'ed in the dabse process. I changed it later
> > to:
> >
> > MYSTRUCT **ModelList;
> > and now the list too is pfMalloc'ed in the dbase process. However when
> > debugging I found out that ModelList is NULL in the application process. How
> > come?
>
> Do you allocate the modellist array in the database process or in the
> application process ? You should allocate the array in the process
> that spawns the other one. And do this BEFORE the process is spawned.
> This way both processes should be able to access the array. You can
> than allocate all elements in the application process OR the database
> process.
>
> By saying that the modellist is NULL in the application process I guess
> that you allocated the array in the database process. I think that this
> is the problem.
Rule of thumb: Allocate shared data BEFORE pfConfig();
_ / _ _
|_) _ ._ _ o /\ |_)|\ | /\ | || \
| \(/_| | || /--\| \| \|/--\|_||_/
=======================================================================
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:55:18 PDT