Re: 2 problems: view culling and shared memory

New Message Reply Date view Thread view Subject view Author view

Wade Olsen (wade++at++surf.shoreline-studios.com)
Wed, 28 Jan 1998 11:17:25 -0800


Kenneth B Russell wrote:
> The second issue is with modification of a data structure which
> was used as an argument to pfNode::setTravData. The data
> structure was allocated in shared memory using pfMalloc and I
> have verified the arena is not NULL, pointer is okay in both APP
> and DRAW processes, etc. However, if I modify the data structure
> in the APP process after calling the modifications
> are not visible in the DRAW process's node callbacks. Since
> setTravData doesn't take as argument the size of the user data
> structure, I assumed it was storing a reference rather than a
> copy (and in fact, the pointer has the same value in the APP
> process and DRAW node callback). Where did I go wrong?

Just out of parnoia you may want to try this:

1) after pfInit print out the value returned by pfGetSharedArena()

2) print out the value your giving to setTravData.

If the latter is really in shared memory it should be somewhat greater
than the former. If it's less than the former or looks completely
differnt then it's probably not in shared memory.

Also, if you have code that is looking for changes in this structure in
shared memory several times within one invocation of a function
(unlikely) you might need to use the "volatile" token to tell the
compiler not reduce these memory fetches to just one fetch.

Best of luck,

Wade
__________________________________________________________________________
> Kenneth B. Russell Synthetic Characters Group, MIT Media Lab
> kbrussel++at++media.mit.edu http://www.media.mit.edu/~kbrussel
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
-----------------------------
Wade Olsen, Shoreline Studios
e-mail:	wade++at++shoreline-studios.com
phone:	650-969-7896
fax:	650-969-7864
www:	http://www.shoreline-studios.com
=======================================================================
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:56:38 PDT

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