Re: Memory management question
Gan Wang (gan++at++cavalier.cambridge.com)
Thu, 18 Apr 1996 18:58:47 -0400
On Apr 18, 3:06pm, uunet!MAPS.CS.CMU.EDU!Stephen_Gifford wrote:
> Subject: Memory management question
>
> We have a Performer program that basically does the following
> iteratively:
>
> Read geometry into Performer structures
> Rebuild each geoset with the GeoBuilder
> Free the old geoset
> Write the new geometry
> pfDelete() the hierarchy
>
> Everything is allocated with pfNew* or pfMalloc (geoset arrays).
> We got what looks to be a massive core leak, so we tried the
> following:
>
> Read geometry into Performer structures
> Write geometry back out
> pfDelete() the hierarchy
>
> And we still have massive core leaks.
> So we decided to try deleting the hierarchy ourselves, thinking that
> perhaps geosets arrays were being leaked. Here we explicitly
> pfFree()'ed all the geoset arrays, and pfDelete()'ed all the pfNodes.
> And still have massive core leak problems.
>
> Has anyone else had similar problems and managed to solve them?
>
> -thanks
> Steve Gifford
> Digital Mapping Laboratory
> School of Computer Science
> Carnegie Mellon University
>
>
>
>-- End of excerpt from uunet!MAPS.CS.CMU.EDU!Stephen_Gifford
Is it possible that you have configured a pfMultiprocess mode such as
PFMP_APP_CULL_DRAW and, at the same time, when you do "Free the old geoset" you
used pfFree() instead of pfDelete()? If that is the case, you may be
destroying gsets that pfDraw() would still expect to draw in the next frame
time, and it gets upset with corrupted memory and dumpts core. PfFree is
heavy-handed and does not honor the reference counts. You can confirm this is
true by changing the mode to PFMP_APPCULLDRAW.
If you have to "Free the old geoset" on the fly in multiprocess mode, you may
have to find a way not to delete/free the gsets until after the draw process is
done with them, such as frame stamping them.
Hope it helps.
Gan
--
Gan Wang
Cambridge Research Associates Office: 703-790-0505/703-917-5731
1430 Spring Hill Road, Suite 200 Fax: 703-790-0370
McLean, VA 22102 Internet: gan++at++cambridge.com
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:52:44 PDT