I have 2 applications which use the same shared libraries and I only want one of them to use tbbmalloc_proxy. Is there a good way to do this on Windows?
Currently, all of my applications are using tbbmalloc_proxy because tbbmalloc_proxy.h is carefully included a library that everyone else links against so that static constructors in each of the DLL's will use tbbmalloc for memory allocation. However, I want to allow third-parties to link against these libraries where I shouldn't be forcing tbbmalloc_proxy on them. In fact, if the static construction order is wrong, we can have the third party constructors allocate memory using CRT malloc() and then deallocating it using tbbmalloc (which seems to cause crashes).