TCMalloc is a great heap manager for multi-threaded use (in my case OpenMP). It was quite easy to get everything with tcmalloc up and running for linux, windows, 32 bit, but right now I am completely stuck with win-64:

  • I use dynamically linked x64 libtcmalloc-minimal built with VS2012
  • Everything gets linked just fine, program starts fine, and { new, malloc, realloc, free } work just fine
  • With a first call to delete, or delete [], the program crashes as the delete operator from std library (in dbgdel.cpp) gets called on the following line:

    _ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse));

  • I tried to use Release versions of everything (as the dbgdel.cpp operator is only used when _DEBUG is defined) with no luck

Any help is greatly appreciated.

有帮助吗?

解决方案

I would like to share the solution I found (the mistake of mine):

in one of the linked libraries in the project I forgot the "_DEBUG" preprocessor macro in the Release build. Removing it solved the problem.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top