amallinfo blocks?

New Message Reply Date view Thread view Subject view Author view

From: Don Tidrow (dtidrow++at++nvl.army.mil)
Date: 04/10/2001 14:44:59


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 | --------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Apr 10 2001 - 14:45:06 PDT

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