The information in this article applies to:
SYMPTOMSAn attempt to load a statically-linked CRT-dependent DLL when all 64 of the TLS slots are already in use fails with the following error code: A process can only map 64 (or less) statically-linked C run-time (CRT) dependent DLLs. A statically-linked CRT-dependent DLL is one in which the CRT library is fully compiled into the DLL. CAUSEThe CRT library makes use of thread-local storage (TLS). Each time a statically-linked CRT-dependent DLL is mapped into a process, the CRT is initialized. During this initialization, a TLS slot is allocated. There are only TLS_MINIMUM_AVAILABLE slots available to each process. This constant is guaranteed to be at least 64 on all Win32 platforms. RESOLUTION
If you have code-control over the DLLs, dynamically link them with the CRT
library. This provides access to all of the CRT functions, without building
them directly into the executable. The DLL version of the CRT is only
initialized once per process.
STATUSThis behavior is by design. REFERENCESFor additional information, please see the following article in the Microsoft Knowledge Base: Q94248 HOWTO: Use the C Run-Time Additional query words:
Keywords : kbDLL kbKernBase kbNTOS400 kbWinOS2000 kbThread kbWinOS95 kbWinOS98 kbDSupport kbGrpKernBase |
Last Reviewed: January 10, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |