From: Marco Costalba Date: Thu, 7 Oct 2010 02:55:08 +0000 (+0100) Subject: Properly set to zero stuff returned by 'new' X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=9ca4359f3691305fc5e3306c3084c83557ce09c0;hp=9ca4359f3691305fc5e3306c3084c83557ce09c0 Properly set to zero stuff returned by 'new' Language guarantees that c'tor is called, but without any c'tor it happens to work by accident because OS zeroes out the freshly allocated pages. The problem is that if I deallocate and allocate again, the second time pages are no more newly come by the OS and so could contain stale info. A practical case could be if we change TT size or numbers of threads on the fly while already running. Bug spotted by Justin Blanchard. No functional change. Signed-off-by: Marco Costalba ---