Computer Chess Club Archives


Search

Terms

Messages

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

Author: Paul

Date: 09:31:54 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 :)

You can add a line to system.ini to tell W98 to swap only if it's
really necessary; in the [386Enh] section add this:

ConservativeSwapfileUsage=1

But I tried that once and didn't like it. It didn't help me with my
program anyway, I wanted to allocate a 192MB hash table with 256MB
memory and didn't succeed either way.

You just have to make sure that the sum of the memory that's
allocated by your program (static & dynamic arrays etc) fits
besides the OS, but you said&know that already. File Cache can
eat up a lot of mem under W98 though, you can also limit that.

You could use a utility like WinTop to see how much your program
really uses up, and might be surprised ...

Hope this helps ...
Paul



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.