There is an oddity with heaps on Windows. If a DLL statically links in the C run time, then that DLL gets its own heap. So if you have 5 DLL like this then your process has at least 5 heaps. And you need to be really careful to call free() in the same DLL that called malloc() (or delete / new).
То есть, если линкую DLL в проекте, то это приводит к разным кучам?