Re: pfLinux memory weirdness

New Message Reply Date view Thread view Subject view Author view

From: ross::barna (rbarna++at++neochi.com)
Date: 07/18/2000 06:27:05


I observed similar behavior in an app i ported from IRIX to LINUX...
what's going on with pfLinux?

On Tue, 18 Jul 2000, Paul John Rajlich wrote:

>
> Hi pfPeople,
>
> I'm having problems deleting pfGeoSets in pfLinux. To illustrate
> the problem, I've written a small program. The following code behaves
> well on my Octane:
>
> int main() {
>
> pfInit();
> pfMultiprocess(PFMP_DEFAULT);
> pfConfig();
>
> pfGeode *geode = new pfGeode();
>
> for (int i=0; i<1000; i++) {
> cout << i << " ";
> cout.flush();
> pfGeoSet *g = pfdNewSphere(10000, pfGetSharedArena());
> geode->addGSet(g);
> geode->removeGSet(geode->getGSet(0));
> delete g;
> }
>
> pfExit();
> return 0;
> }
>
> However, on Linux it fills up the heap. In the Linux version I use
> NULL instead of pfGetSharedArena().
>
> I have found that something like this works:
>
> pfVec3 *verts, *norms;
> pfVec4 *colors;
> ushort *dummy;
> g->getAttrLists(PFGS_COORD3, (void **)&verts, &dummy);
> g->getAttrLists(PFGS_NORMAL3, (void **)&norms, &dummy);
> g->getAttrLists(PFGS_COLOR4, (void **)&colors, &dummy);
> int *lengths = g->getPrimLengths();
> pfFree(pfGetMemory(verts));
> pfFree(pfGetMemory(norms));
> pfFree(pfGetMemory(colors));
> pfFree(pfGetMemory(lengths));
>
> but that's rather painful.
>
> Any ideas?
>
> -Paul
>
> ----------------------------------------------------------------------
> Paul J. Rajlich - prajlich++at++ncsa.uiuc.edu
> Visualization and Virtual Environments
> National Center for Supercomputing Applications
> http://brighton.ncsa.uiuc.edu/~prajlich/
> ----------------------------------------------------------------------
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/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 2b29 : Tue Jul 18 2000 - 09:38:42 PDT

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