When you create a Dll - you always write it in some language - in your case, C ++ using Visual Studio 2005 or 2008.
In this case, it is the C ++ runtime, which is responsible for creating its freestore and deciding on its distribution.
In particular, if you use the runtime Dll option, then one dll - msvcrtxx.dll - manages one freestyle that is shared between all dll and exe that are associated with this dll.
If you use a static runtime parameter when executing your exe and dll, then exe and each dll get their own libc instance, built-in with their own freestore control.
source share