Re: Help needed wrt apparent memory leak in IRIS Performer 2.2
Joshua Shagam (jshagam++at++d-a-s.com)
Fri, 20 Aug 1999 15:12:02 -0400
Yair Kurzion wrote:
>
> > I am having a problem with what appears to be a memory leak in IRIS
> > Performer; namely it seems to not be properly freeing memory in the
> > shared memory arena. As I have a large number of pfGeoSets which need
> > to constantly change size (we are dynamically retesselating a terrain
> > mesh and have to work with pre-existing pfGeoSets, due to the client's
> > requirements), I am having to constantly pfMalloc the pfGeoSets'
> > attribute lists, and make use of Performer's garbage collection (pfFlux
> > apparently can't deal with allocations which change size).
>
> You should note that GeoSet attributes are not multi-buffered. In other words,
> all processes see the same GeoSet and the same attribute memory. Changing
> an attribute list in the App is NOT MP-safe because DRAW may be using this '
> memory.
>
> This is the reason why Fluxed GeoSets came about. A Fluxed Geoset is a
> Flux that contains a GeoSet structure. This structure is multi-buffered so
> you can safely change its attribute pointers in the App and expect them to
> arrive at the Draw in a frame accurate manner.
Yes, and this is why I'm reallocating *new* attribute lists between
frames. It's not perfectly MP-safe, but it can handle attribute lists
which change size. pfFlux cannot, as far as I can tell. The only ill
effect that occasionally happens when the sole race condition is
triggered just causes some vertices to be wrongly-textured (yes, I
understand parallelism and all the various implications and the like);
this is acceptable for our purposes.
The tip given to me by Mark Acosta has already solved my problems.
Thank you.
This archive was generated by hypermail 2.0b2
on Fri Aug 20 1999 - 12:14:38 PDT