Re: performer memory management

New Message Reply Date view Thread view Subject view Author view

Scott Herod (herod++at++evt.com)
Thu, 08 Oct 1998 10:26:58 -0600


Steve Baker's comments were good by I'll add a couple of
comments.

It appears to me that pfVec's are not deleted successfully if you
create them as you have done. I always use something like

pfVec3 pfVec3 *coords = (pfVec3 *)pfMalloc( 4*sizeof(pfVec3),
pfGetSharedArena() );

An advantage of this is that to test I can quickly switch to
a plain malloc and compile with -lmalloc_cv in order to
watch all of the details of memory allocation. Often the
malloc debugging tells me exactly where I am over writing
memory.

Scott Herod

jason allen bryan wrote:
>
> hello all!
> i have a stumper for all the pfGuru's out there:
> while writing a small simulation in performer, i ran
> into some problems debugging pfVec3 and pfMatrix intensive
> code, specifically that code related to object placement
> and manipulation in a scene. it seems even the most basic
> operations on these class instances failed to function as
> expected. a pfVec3 would be initialized and work fine for
> one or two iterations, and then all of a sudden acquire
> illegal values for floating point numbers. normally i would
> assume a problem with my code. in this case, i was able to
> fix the problem by allocating a few more dummy pfVec3's
> before allocating those pfVec3's needed by the simulation.
> i.e.
> /* does not work */
> pfVec3 pos, vel, acc, ... etc
> pfMatrix orientation, ... etc
> void UpdateScene () {
> ... }
> ...etc
>
> /* works */
> pfVec3 dummy[3];
> pfVec3 pos, vel, acc, ... etc
> pfMatrix orientation, ... etc
> void UpdateScene () {
> ... }
> ...etc
>
> i know performer has a great deal of run-time library support
> and that dynamic allocation of some performer classes is tricky,
> if not impossible. it seems to me the problem lies in performer's
> management of its shared memory arena.
> has anyone experienced a problem similar to this? does anyone know
> the solution?
> the simulation is currently being designed to run on an Onyx or
> Onyx2, IRIX6.5, with performer2.2.
> thanks in advance to whomever responds!
>
> jason bryan
>
> Ohio Supercomputer Center


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Oct 08 1998 - 09:27:09 PDT

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