Re: more detail about pfMalloc & object container

New Message Reply Date view Thread view Subject view Author view

Marcus Barnes (marcus++at++multigen.com)
Tue, 28 Apr 1998 11:12:09 -0700


On Apr 28, 12:33pm, David Chan wrote:
>And also I try to print out the address of shared->console[0], it
>is 0 ...

You need to be a bit more precise here. You are interested in the the value of
shared->console[0] not its address. Its address can only be 0 if you failed to
allocate SharedData to begin with and it is the first data member.

shared->console[0] = new DerivedConsole;
printf( "%p", shared->console[0] ); // address of DerivedConsole object

NOTE: You cannot use iostream's unless you link with CC.

Regards.

--
+ Marcus Barnes, Technical Staff        mailto:marcus++at++multigen.com +
+ Multigen Inc.                         http://www.multigen.com    +
+ 550 S. Winchester Blvd.               phoneto:1-408-556-2654     +
+ Suite 500 San Jose CA 95128           faxto:1-408-261-4102       +
=======================================================================
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:57:18 PDT

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