Re: Possible memory leak in Performer2.2 .

New Message Reply Date view Thread view Subject view Author view

Oyvind Roa (oyvind.roa++at++ks-t.no)
Fri, 15 May 1998 16:35:59 +0200


Robert C Subr wrote:
>
> I had a similar problem with software I wrote to tile a large area data base.
> It turned out to be memory fragmentation. You can look at the arena use by
> using the amallinfo() from the amalloc functions. This might help you
> determine if it is a memory fragmentation problem or a leak in your code. Hope
> this helps some. Good Luck.
>
> Rob

Thanks a lot Robert for pointing me in the right direction.
I have tried amallinfo() in my application, and found that
I do get huge amounts of "Free ordinary blocks" after a
while. I have plaid around with amallopt(), and have now
reduced the "memory leakage" down to a fraction, however it
is not completely gone. What made the biggest difference was
the option :
        amallopt(M_FREEHD, 1, pfGetSharedArena()) ;
but I also increased the number of free blocks amalloc()
scans before it grabs a new one, done with the function:
        amallopt(M_MXCHK, 1000L, pfGetSharedArena()) ;
Increasing the number of free blocks scanned has some
performance penalty, so it should probably be kept as low as
possible without "eating" to much memory.

Does anyone know how I can reduse this problem the most, in
addition to or instead of tuning with amallopt(). A typical
report from amallinfo()looks like this :

amallinfo : Arena size : 133480432
amallinfo : Ordinary blocks : 406292
amallinfo : Small blocks : 460200
amallinfo : Holding block headers : 147264
amallinfo : Holding blocks : 4602
amallinfo : Small blocks in use : 6460256
amallinfo : Free small blocks : 1461344
amallinfo : Ordinary blocks in use : 80166016
amallinfo : Free ordinary blocks : 45245552
amallinfo : Space penalty if keep : 0

Oyvind

-- 
Oyvind Roa
Kongsberg Defence & Aerospace A/S Phone:  (+47) 32723253
P.O. Box 1003                     Fax:    (+47) 32286902
N-3601 Kongsberg                  Email:  oyvind.roa++at++kongsberg.com
Norway
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:24 PDT

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