Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

hash mem in win-chess progs

15 views
Skip to first unread message

PC SOL

unread,
Sep 28, 1995, 3:00:00 AM9/28/95
to
Heres a question for Windows-Chess programmers..
How would a WIndows chess-program set its upper limit for
hash-table size? As far as I can see there is no simple
way to force allocation of non-virtual RAM for chess
hash-tables - because Windows uses virtual disk-ram.
In fact you dont really want to 'force' RAM allocation, since
it messes up multitasking. GlobMemFree is no use - it tells
you how much VIRTUAL RAM you have - including disk-spool space.
The only idea I can think of is this - there are some INT
calls that tell you how much 'real' RAM you have - take these
figures, knock a meg or so off for Windows, and set this as
the max selectable by a user "Set hash size" option.
Then, when the user selects a figure, perform an access-speed
test on the size of mem requested, and if access is slow,
you guess that the user is requesting too much, and pop-up
a warning message to that effect..
This method seems to work fine in proctice, but its a bit
inelegent - has anyone got any better ideas?
Thanks!

--
PC SOLUTIONS - PO BOX 954, BOURNEMOUTH BH7 6YJ, ENGLAND
EMAIL 10064...@compuserve.com

Ed Schröder

unread,
Sep 30, 1995, 3:00:00 AM9/30/95
to
The problem with Windows is that if you define a big amount of
memory (1 Mb or more) for the use of Hashtables in a chessprogram
there is a great risc that Windows writes the entire Hashtable to
the SWAPFILE instead of the PC's fast memory.

That's why DOS programs always will play stronger since with DOS
you can define the hashtable as big as you please (with most
chessprograms).

Ed Schröder
Author of Rebel 7.0

0 new messages