View Single Post
Old 08-24-2017, 02:29 PM   #4
Justin's Avatar
Join Date: Jan 2005
Location: NYC
Posts: 11,767

Originally Posted by vitalker View Post
Wow, what is that? Sounds promisingly.
You can look up MSDN pages for TlsAlloc() and FlsAlloc(), but if you go to the debug console, you can type the command "tls_avail" which will show you how many slots of each are free. On most systems there are 1088 TLS slots and 128 FLS slots available per process.

Each copy of the CRT will typically use one of either. CRTs can be static linked or dynamic linked -- if they are static linked, then each module that links with it will use one of those slots; if they are dynamic linked, then each version of the CRT will use one of those slots.

REAPER and its plug-ins are static linked. This isn't ideal from a slot-conservation perspective, but it is currently necessary in order to support running without having to install a shared copy of the CRT (there is probably a workaround using the latest MSVC versions where you can bundle the shared library with your app, but we aren't there yet).

Anyway, long story short: this build makes the Win64 version behave like the Win32 version, which is to use a TLS slot per module rather than a FLS slot (since there are many, many more TLS slots available). It shouldn't change too much, other than giving a marginal improvement to the number of C runtimes loadable at once.

Also, if you run into FLS/TLS limits, you should try enabling prefs/VST/"Allow full unload of VSTs" and restarting REAPER. That will ease those limits as you're able to free up some of those slots when unloading plug-ins.
Justin is offline   Reply With Quote