Tagore D. Smith (tdsmith++at++escher.cs.umass.edu)
Fri, 10 Jul 1998 15:01:32 -0400 (EDT)
I am trying to create a non-indexed geoset made up of triangle strips.
The pointer to the array holding the striplengths is a member variable of
my main application class, which is declared globally, before pfInit(),
etc. . I allocate the memory like this:
striplengths=(int *)(pfMalloc((height-1)*sizeof(int)),
pfGetSharedArena());
When I try to write to the memory the app freezes (in fact the whole
machine slows to a crawl), and dumps core after about two minutes. I write
to the memory like this:
for(loop=0; loop<(height-1); loop++){
striplengths[loop]=(2*width);
}
I am using the PFMP_APPCULL_DRAW model, and forking off the user
interface code, although I have tried using PFMP_APPCULLDRAW, with similar
results.
Earlier I use exactly the same syntax to allocate the memory for the
array which holds the geosets coordinates. I can write to that memory
without problems. I am pretty sure that I am not running out of space in
the shared arena, because when I comment out the earlier allocation (which
is much larger) the problem still exists. If I write only to the first
five indices it is fine, but if I write to the first ten I get an
immediate core dump. If I malloc the memory I can write to it without
problems, but then I can't really use it for the geoset.
I'm using Performer 2.1 on an Onyx iR running Irix 6.2.
If anyone can see something glaringly wrong with this code, I would
really appreciate hearing about it. Am I failing to understand something
basic about how Performer deals with shared memory?
Thanks,
Tagore Smith
=======================================================================
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:57:41 PDT