syzygy request for info

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
syzygy
Posts: 4343
Joined: Tue Feb 28, 2012 10:56 pm

Re: syzygy request for info

Post by syzygy » Sun Dec 02, 2018 7:00 pm

elcabesa wrote:
Sun Dec 02, 2018 6:36 pm
from what I have understood e.get(i, f)->pieces[k] will store the 4 bit ( with color information ) info about the piece. so I have to mantain the color, but invert the order of pieces.
Correct.

phhnguyen
Posts: 292
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: syzygy request for info

Post by phhnguyen » Sun Dec 02, 2018 9:47 pm

Hi Ronald de Man,
From an Apple's document of "Mapping Files Into Memory" (https://developer.apple.com/library/arc ... emory.html) I have read a condition NOT to map files:
The file is several hundred megabytes or more in size. Mapping large files into memory fills memory quickly and may lead to paging, which would negate the benefits of mapping the file in the first place. For large sequential read operations, disable disk caching and read the file into a small memory buffer instead.
From my reading I know your syzygy tablebase uses file mapping and many files (from 6 men) are more than "several hundred megabytes". My curious questions:
1) Do I miss somethings?
2) Are you aware and / or have code for that (not to map) condition?
Thanks

syzygy
Posts: 4343
Joined: Tue Feb 28, 2012 10:56 pm

Re: syzygy request for info

Post by syzygy » Sun Dec 02, 2018 10:53 pm

They're thinking of sequential read operations which would cause the whole file to be transferred into physical RAM. That is an entirely different use case.

phhnguyen
Posts: 292
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: syzygy request for info

Post by phhnguyen » Mon Dec 03, 2018 12:08 am

Do you think after one or few games, a large endgame file may be read out too many so it ends up to be loaded entirely into memory by mapping-file?

Post Reply