summaryrefslogtreecommitdiff
path: root/trdlocal.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-03-15 06:20:45 -0400
committerJeffrey Walton <noloader@gmail.com>2017-03-15 06:20:45 -0400
commit46c9cc725cf325f2990056526a00848a11d37fa8 (patch)
tree0c56bbeaaa20642706601a15428e4c03d4c9dabc /trdlocal.cpp
parent354502d59da41d2aaeb301a66570fe3a625f3d7c (diff)
downloadcryptopp-git-46c9cc725cf325f2990056526a00848a11d37fa8.tar.gz
Use C++03 Singleton on select Microsoft platforms (Issues 372, 373, 389, 391)
We are back to the "... one object may end up being memory leaked" if faced with concurrent initialization
Diffstat (limited to 'trdlocal.cpp')
-rw-r--r--trdlocal.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/trdlocal.cpp b/trdlocal.cpp
index beb21e98..a4c3b683 100644
--- a/trdlocal.cpp
+++ b/trdlocal.cpp
@@ -26,6 +26,8 @@ ThreadLocalStorage::Err::Err(const std::string& operation, int error)
{
}
+// Windows: "a process may have up to TLS_MINIMUM_AVAILABLE indexes (guaranteed to be greater than
+// or equal to 64)", https://support.microsoft.com/en-us/help/94804/info-thread-local-storage-overview
ThreadLocalStorage::ThreadLocalStorage()
{
#ifdef HAS_WINTHREADS