thread_specific_ptr max indexes,
Members - Reputation: 130
Posted 13 August 2012 - 03:09 AM
I'am working on a large project with an aim to introduce some multithreading. We started using boost TLS specific storage and I was wondering what is the actual maximum number of TLS indexes supported in Win platform (specifically xp and win7).
I checked the implementation and thread_specific_ptr is simply using standard windows TlsGetValue/TlsSetValue API but I'm concerned about what I found here:
It states that the minimal guaranteed amount of indexes per process is only 64, and maximal number is 1088. We have definitly more then 200 dlls in the project and many of those need a TLS index.
So the question is: how can I check what is the actual number of TLS indexes supported on a specific platform?
Thank you in advance,
Members - Reputation: 535
Posted 13 August 2012 - 10:06 AM
Sp depending on your programs' usage of the process heap, you'll either be able to afford the 4/8K for 1,088 slots for all threads, only some of your threads, or for none of them.