RE : database paging memory leak

New Message Reply Date view Thread view Subject view Author view

Øyvind Roa (oyvind.roa++at++ks-t.no)
Fri, 20 Nov 1998 12:57:39 +0100


> 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 Fri Nov 20 1998 - 03:59:58 PST

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