RE : database paging memory leak

New Message Reply Date view Thread view Subject view Author view

Wear, Mark (mark.wear++at++lmco.com)
Wed, 25 Nov 1998 07:24:10 -0700


> Thanks for the information.
>
> I had already included the M_FREEHD line of code in my application. I
> added the second line and it seems to have lessened the problem, but I
> still have a slow leak. My machine has 512 MB of memory. I lose about 1 MB
> every 4-5 seconds with the free memory holding constant over some
> periods. I believe the problem must be fragmentation. I have gotten a
> number responses from people who have had similiar symptoms.
>
> When printing the information about the shared memory arena, I did see
> that the number of free ordinary blocks increased. The shared memory arena
> size also increased. One concern that I have is that when using gmemusage
> to view memory allocations and total free memory, the amount of memory
> lost as seen in gmemusage did not match that of the increased size of the
> memory arena. I'm not sure how to interpret that.
>
> Our application currently allocates large amounts of memory during each
> build. The size of which can differ with every build. I fear that this
> irregularity in the amount of memory allocated and deallocated per build
> is the root of our problem.
>
> I'm still working on this issue, and would love in further information
> that anyone might offer.
>
> Thanks,
> Mark Wear
>
>
Mark E. Wear
Electronic Systems Engineer
Real-Time Simulation
Lockheed Martin Vought Systems
(972) 603-2758
mark.wear++at++lmco.com

> ----------
> From: Øyvind Roa[SMTP:oyvind.roa++at++ks-t.no]
> Sent: Friday, November 20, 1998 5:53 AM
> To: 'mark.wear++at++lmco.com'; 'info.performer++at++sgi.com'
> Subject: RE : database paging memory leak
>
> Hello Mark,
>
> We have been struggling with the same problems here at our site.
> The problem is usually due to memory fragmentation, and Performers
> ability to reuse it. Performer is optimized for speed, and sometimes
> is not very good at reusing memory.
>
> Our problem was reduced a lot when I included the following lines
> at the beginning of the program :
>
> #include <malloc.h>
>
> amallopt(M_FREEHD, 1, pfGetSharedArena()) ;
> amallopt(M_MXCHK, 10000, pfGetSharedArena()) ;
>
>
> You can monitor the memoryusage with the code :
>
> struct mallinfo info ;
>
> info = amallinfo(pfGetSharedArena()) ;
> printf("amallinfo : Arena size : %d\n", info.arena) ;
> printf("amallinfo : Ordinary blocks : %d\n", info.ordblks) ;
> printf("amallinfo : Small blocks : %d\n", info.smblks) ;
> printf("amallinfo : Holding block headers : %d\n", info.hblkhd) ;
> printf("amallinfo : Holding blocks : %d\n", info.hblks) ;
> printf("amallinfo : Small blocks in use : %d\n", info.usmblks) ;
> printf("amallinfo : Free small blocks : %d\n", info.fsmblks) ;
> printf("amallinfo : Ordinary blocks in use : %d\n", info.uordblks) ;
> printf("amallinfo : Free ordinary blocks : %d\n", info.fordblks) ;
>
> You will probably see that the amount of "Free ordinary blocks" increases
> as you start paging.
>
> Regards,
> Oyvind Roa
>
>
> ----------------------------------------------------------------
> Oyvind Roa
> Senior Software Engineer
>
> Kongsberg Defence & Aerospace A/S, Simulation & Training
> Box 1003, N-3601 Kongsberg
> NORWAY
>
> E-maill : oyvind.roa++at++kongsberg.com
> ----------------------------------------------------------------
>
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
> www.mimesweeper.com
> **********************************************************************
>
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Wed Nov 25 1998 - 06:24:19 PST

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