Re: [info-performer] Creating objects in shared memory

Date view Thread view Subject view Author view

From: Don Burns (don++at++andesengineering.com)
Date: 07/15/2004 09:16:44


You need to overload the new() operator in your object and call pfMalloc()
within the new() operator. This will allocate the memory in the shared
memory arena.

You must also, however, initialize any pointers you want to use in your
child processes before pfConfig(). Or, alternatively, allocate a
structure that will contain shared pointers using pfMalloc() before
pfConfig().

-don

On Wed, 14 Jul 2004, Alan Gifford wrote:

> I don't know a lot about multiprocessing, but I am trying to get a
> Performer app to spawn a child process which computes values for use in
> position of graphics objects. I have a problem in that I don't know how
> to create my own C++ objects in the shared memory. Everything I find on
> the Internet is about creating the Performer objects in shared memory,
> and not objects that I create myself.
>
> The child process that I'm creating has to have access to these objects,
> because it is the object itself which does the calculation. Does anyone
> have an example or a description of how this is done? I am really stuck
> here, and searching the Net is not helping me out at all.
>
> Thanks a bunch.
>
> Alan
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
> SIGGRAPH 2004 Friends of Performer BOF:
> Tuesday, August 10, 6pm - 8pm Wilshire Grand Hotel, Sierra Ballroom
> -----------------------------------------------------------------------
>
>


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jul 15 2004 - 10:22:53 PDT