Re: Company-Confidential

New Message Reply Date view Thread view Subject view Author view

Guy Premont (silicon-worlds++at++calva.net)
Thu, 17 Apr 1997 09:46:22 +0200


> Robert C Subr <subrrc++at++wl.wpafb.af.mil> asked:
>
> > I am new at C++ and have a question concerning the PF shared arena. How do I
> > setup my user classes so they are defined in the pfsharedarena when the
> > operator new is used or deleted from the pfsharedarena when the operator delete
> > is called?
>
Steve Baker wrote:
>
> The basic mechanism is to overload 'operator new' and 'operator delete' for
> all classes that you want to place in shared memory.
>

Here Steve creates a new class which only overload the operators new and
delete and has them use shared memory.

Would it be possible to use a Performer base class, like pfMemory or
pfObject, to do just the same?

I'm thinking about:
class MyOwnClass : public pfMemory
{
        [...class definition...]
}

which would allows the use of:
MyOwnClass *object = new(pfGetSharedArena()) MyOwnClass;

Is this valid? It looks like a good idea to me.

Guy

===========================================
          Silicon Worlds S.A.
12, rue de Chatillon 75014 Paris France
       Tel: +33 (01) 53.90.11.11
       Fax: +33 (01) 53.90.11.12
===========================================
=======================================================================
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:55:05 PDT

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