Steven Lovelady (stevenl++at++skopen.dseg.ti.com)
Mon, 28 Apr 1997 07:06:18 +0000
I have a question about the memory allocation in Performer. Do
these two methods of memory allocation give you the same result in
Performer?
Method 1:
------------------------
typedef struct {
pfVec3 xyz;
pfVec3 hpr;
pfGeoState gstate;
} BOGUS;
BOGUS bog = pfMalloc( sizeof(BOGUS), pfGetSharedArena() );
Method 2:
------------------------
typedef struct {
pfVec3 *xyz;
pfVec3 *hpr;
pfGeoState *gstate;
} BOGUS;
BOGUS bog = pfMalloc( sizeof(BOGUS), pfGetSharedArena() );
bog->xyz = pfMalloc( sizeof(pfVec3), pfGetSharedArena() );
bog->hpr = pfMalloc( sizeof(pfVec3), pfGetSharedArena() );
bog->gstate = pfNewGState(pfGetSharedArena());
I am asking for two reasons. First, if I use Method #1 will all of
the processes be able to see all of the members of the structure?
Second, does the pfNewGState function do anything special to allocate
the memory for the GeoState or will it be ok if it is allocated as
part of the structure?
Thanks,
Steve
Steven Lovelady
Texas Instruments, Inc.
phone: (972) 575-6758
fax : (972) 575-6771
email: steven-lovelady++at++ti.com
"My views are not necessarily those of Texas Instruments"
=======================================================================
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:07 PDT