projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
59d32f8
)
Turn on random access for Syzygy files in Windows (#1840)
author
mstembera
<m_stembera@yahoo.com>
Sun, 23 Dec 2018 15:09:03 +0000 (07:09 -0800)
committer
Marco Costalba
<mcostalba@users.noreply.github.com>
Sun, 23 Dec 2018 15:09:03 +0000 (16:09 +0100)
* This is the Windows version of
https://github.com/official-stockfish/Stockfish/pull/1829
No functional change.
src/syzygy/tbprobe.cpp
patch
|
blob
|
history
diff --git
a/src/syzygy/tbprobe.cpp
b/src/syzygy/tbprobe.cpp
index
60979a5
..
57c7d87
100644
(file)
--- a/
src/syzygy/tbprobe.cpp
+++ b/
src/syzygy/tbprobe.cpp
@@
-224,8
+224,9
@@
public:
exit(1);
}
#else
+ // Note FILE_FLAG_RANDOM_ACCESS is only a hint to Windows and as such may get ignored.
HANDLE fd = CreateFile(fname.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
+ OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, nullptr);
if (fd == INVALID_HANDLE_VALUE)
return *baseAddress = nullptr, nullptr;