RE: [info-performer] Unexplained memory behavior

New Message Reply Date view Thread view Subject view Author view

From: Don Tidrow (dtidrow++at++nvl.army.mil)
Date: 06/24/2002 17:29:32


Use delete, not pfDelete - loses much less memory that way, at least on pf2.2. Still,
the amount of free arena memory left after the for loop is about 19M less than before the
loop - I would have expected it to be the exact same value.

Before loop:
Total arena memory used: 237552
        # of ord. blocks: 45
        # of small blks: 5400
        # of holding blks: 54
        Used space
         Space in holding blk hdrs: 1728
         Space in used small blks: 86912
         Space in used reg. blks: 146624
        Free space
         Small blocks: 1088
         Reg. blocks: 1200

Space remaining in arena: 1073504272

After loop:
Total arena memory used: 19800048
        # of ord. blocks: 47
        # of small blks: 5400
        # of holding blks: 54
        Used space
         Space in holding blk hdrs: 1728
         Space in used small blks: 86912
         Space in used reg. blks: 12720832
        Free space
         Small blocks: 1088
         Reg. blocks: 6989488

Space remaining in arena: 1053941776

Does pf2.2 suffer from some nasty memory leaks, or is there something else happening?
By the way, pf2.5.1 doesn't seem to show this behavior, at least on Linux.

On 24-Jun-2002 Buckley, Bob, CTR wrote:
>
> Can someone tell me why this test case sucks up memory?
> Thanks.
>
>#include <Performer/pf/pfGroup.h>
>
> void main(void)
> {
> pfInit();
> pfMultiprocess(PFMP_APPCULLDRAW | PFMP_CULL_DL_DRAW);
> pfConfig();
>
> for (int i = 0; i < 1e6; i++)
> {
> pfGroup *grp = new pfGroup;
> pfDelete(grp);
> }
> }

-- 

Klein bottle for rent - inquire within.

-------------------------------------------- | Don Tidrow | | Visual Simulation Developer | | US Army CECOM-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 : Mon Jun 24 2002 - 17:29:49 PDT

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