From: Paul John Rajlich (prajlich++at++ncsa.uiuc.edu)
Date: 07/19/2000 06:54:28
pfPeople,
Somebody suggested that I try pfDelete(g). This doesn't work on
either Linux or IRIX!
"delete g" works on IRIX, but not on Linux.
-PAul
----------------------------------------------------------------------
Paul J. Rajlich - prajlich++at++ncsa.uiuc.edu
Visualization and Virtual Environments
National Center for Supercomputing Applications
http://brighton.ncsa.uiuc.edu/~prajlich/
----------------------------------------------------------------------
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
>
This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 06:55:46 PDT