Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Does anyone know how to prevent the swap file from being accessed?

Author: Tom Kerrigan

Date: 10:24:02 06/26/00

Go up one level in this thread


On June 26, 2000 at 11:57:48, KarinsDad wrote:

>In both a Windows 98 and a Linux OS, my program hits the swap file heavily when
>accessing the hash table.
>
>However, I have the hash table sized specified at about 40-45% of all memory in
>both cases (I am testing on a 256 MB Windows 98 system with 120 MB hash and a
>128 MB Linux system with a 50 MB hash).
>
>I cannot believe that my program and the OS take up so much memory that I have
>to go to the swap files. This has to be an OS default which forces applications
>to swap, even though they shouldn't have to.
>
>Does anyone know of a way to programatically tell the OS to knock it off?
>
>Thanks,
>
>KarinsDad :)

Make sure your program is taking up the right amount of memory. Sometimes the
compiler will try to align data neatly and make your structs bigger than you
want them to be. It's possible that your hash table is twice the size that you
expect.

-Tom



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.