]> git.sesse.net Git - stockfish/blobdiff - src/tt.h
Polynomial material balance after 100.000 games
[stockfish] / src / tt.h
index e8dc021bafc1d537524ebdfa2b55754d98388f6b..fb414bf157aeba9fa98fbe70bbb728cd27445e1e 100644 (file)
--- a/src/tt.h
+++ b/src/tt.h
@@ -1,7 +1,7 @@
 /*
   Stockfish, a UCI chess playing engine derived from Glaurung 2.1
   Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
-  Copyright (C) 2008 Marco Costalba
+  Copyright (C) 2008-2009 Marco Costalba
 
   Stockfish is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -92,7 +92,13 @@ public:
 private:
   inline TTEntry* first_entry(const Key posKey) const;
 
-  unsigned size, writes;
+  // Be sure 'writes' is at least one cacheline away
+  // from read only variables.
+  unsigned char pad_before[64 - sizeof(unsigned)];
+  unsigned writes; // heavy SMP read/write access here
+  unsigned char pad_after[64];
+
+  unsigned size;
   TTEntry* entries;
   uint8_t generation;
 };