Re: amallinfo blocks?

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 04/10/2001 16:37:13


Have you tried calling this immeditely after pfInit.

That should work for sure. Then try to narrow down when/where it breaks.

Cheers,Angus.

Don Tidrow wrote:
>
> Anybody know of a situation in which amallinfo would block/spin, and what can be
> done to free it up? I'm trying to get some info about memory usage in the
> shared arena, but amallinfo never returns from within my program. I've tested
> the exact same function in another Performer-based program, and it works fine
> there.
>
> Here's the offending function:
>
> void printArenaData(void* arena)
> {
> struct mallinfo mi;
> if(arena)
> {
> mi = amallinfo(arena); <-- never gets past here
>
> cout << "Total arena memory used: " << mi.arena << endl
> << "\t# of ord. blocks: " << mi.ordblks << endl
> << "\t# of small blks: " << mi.smblks << endl
> << "\t# of holding blks: " << mi.hblks << endl
> << "\tUsed space" << endl
> << "\t Space in holding blk hdrs: " << mi.hblkhd << endl
> << "\t Space in used small blks: " << mi.usmblks << endl
> << "\t Space in used reg. blks: " << mi.uordblks << endl
> << "\tFree space" << endl
> << "\t Small blocks: " << mi.fsmblks << endl
> << "\t Reg. blocks: " << mi.fordblks << endl << endl
> << "Space remaining in arena: " << pfGetSharedArenaSize() -
> mi.arena << endl;
> }
> }
>
> Any ideas?
>
> Don
>
> --
> "If Java had true garbage collection, most programs would delete
> themselves upon execution." - Robert Sewell
>
> --------------------------------------------------
> | Don Tidrow |
> | Visual Simulation Developer |
> | US Army TACOM (currently working with NVESD) |
> | ph: (703)704-1361 fax: (703)704-1753 |
> --------------------------------------------------
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/

"Whenever there is a conflict between human rights and property rights, human rights must prevail." --Abraham Lincoln


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Apr 10 2001 - 16:37:42 PDT

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