Scott McMillan (scott++at++ht.com)
Mon, 22 Jul 1996 19:40:55 -0400 (EDT)
I am trying to create a pfGeoSet consisting of a line segment, and at
some point I do something like the following to allocate an array of two
vertices for the endpoints of the line segment:
pfVec3 *vertex;
if (NULL == (force_vertex = new pfVec3[2]))
{
cerr << "Unable to pfMalloc vertex list array.\n";
exit(3);
}
It works on machines with one CPU, so I had assumed that it allocated these
out of the shared arena. When I move over to the Onyx, I get behaviours that
remind me of shared arena problems -- like the pfVec3 array and its elements
aren't in the shared arena (or little Onyx-gremlins are romping through
memory).
I have also tried using "new(pfGetSharedArena()) .." without luck (it won't
compile).
I have had success by dropping back to 1.2 habits and using pfMalloc:
if (NULL == (force_vertex = (pfVec3 *) pfMalloc(2*sizeof(pfVec3),
pfGetSharedArena())))
{
...
}
but I would really like to know the proper way to do this using new.
Thanks in advance,
scott
--
Scott McMillan, Ph.D. | Developers of virtual environment
scott++at++ht.com | medical and surgical simulations
HIGH TECHSPLANATIONS, INC. | and surgery simulation creation
http://www.ht.com | tools.
=======================================================================
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:12 PDT