C++/memory allocation

New Message Reply Date view Thread view Subject view Author view

wasileskib++at++adadv1.mdc.com
Thu, 15 Aug 1996 10:18:27 -0500


I have a structure which contains numerous pointers
to performer classes. I pfMalloc() memory of this
structure from the shared memory arena to a
global pointer using:

myptr = (mytype *)pfMalloc(sizeof(mytype), pfGetSharedArena());

My question is regarding the memory allocation
of the performer class pointers with the "new" operator
that lie within the data type, 'mytype'.

For the variables within 'mytype' which are not
automatically created from shared memory, like pfChannels,
is it necessary to explicity to allocate memory for the variables from
shared memory in addition to the pfMalloc statement above....

OR since 'myptr' is allocated from the arena, as in
the statement above, does this imply that all the
elements within 'myptr' which I construct with the
"new" operator will allocate memory from the arena as
opposed to the heap?

Hope this question is clear.
Thanks.

- bryan

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:22 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.