Re: Strange shared arena allocation thing going on here

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 02/10/2000 17:53:09


You can use amallopt to more aggressively reuse memory.

turning on M_FREEHD and using a larger number for M_MXCHK does the
trick. I also like increasing M_MXFAST. This has come up many times and
the archives have several posts on doing this.

Future releases of Performer will use different defaults to improve this
situation.

Cheers,Angus.

"Acosta, Mark W [Magic Earth LLC]" wrote:
>
> Hello,
>
> I've got some unusual memory behavior going on here and I hope someone can
> explain to me what's going on. I have a performer application that will,
> under certain conditions, allocate and free memory from the shared arena on
> every frame. I noticed a couple of times if I left it running for a while,
> it would just terminate with an "unable to allocate <n> bytes from arena".
> So, I decided to run the application again and print the info from
> "amallinfo" on the Performer shared arena. The behavior I see is the shared
> arena gradually gets bigger and bigger but the space used stays fairly
> constant and the space in free blocks gets bigger as the arena gets bigger.
> Here's a snapshot of the last amallinfo I got just before it blew up.
>
> Total space in arena: 535920608
> Number of ordinary blocks: 22762
> Number of small blocks: 43100
> Space in holding block headers: 20688
> Number of holding blocks: 431
> Space in small blocks in use: 1332736
> Space in free small blocks: 4864
> Space in ordinary blocks in use: 18257728
> Space in free ordinary blocks: 516304592
> Space penalty if keep option is used: 294432
>
> As you can see, there's an awful lot of free space here. There seems to be
> very little or no reuse of free blocks going on. I guess one question is,
> is Performer setting up the arena in some way that might cause this
> behavior?
>
> I also had a hunch that the app was blowing up when it hit the end of the
> arena and, sure enough, I had a 512MB arena and it blew up just about the
> time the arena grew to 512MB. I guess fragmentation could cause it to fail
> but the chunks of memory I'm getting are fairly consistant in size so I
> wouldn't expect it to be that bad.
>
> Does anyone know if the M_DEBUG option in amallopt works? I've tried turning
> it on and as far as I can tell, it's not doing anything. It's not even clear
> from the man page what it suppose to do if it finds a problem.
>
> By the way, I'm running this on a dual 12000 Octane, 2GB memory, IRIX 6.5.5.
>
> Thanks
>
> Mark Acosta
> Magic Earth LLC
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/
My comment on the abuse of Jon Johanson's rights;
After giving up raiding their neighboring countries the Norse men
have taken to raiding 16 year old kids in their bedrooms. Very sad.


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Feb 10 2000 - 17:53:33 PST

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