Changing the Default CRT Heap
-
Hi all, I was wondering if anyone knew of a way to change the default C-runtime heap for a DLL. I would like a DLL that I am creating to automatically allocate its data into a different heap than the host process, and I dont really want to resort to writing my own heap manager or using the Win32 heap functions to manage memory. Thanks
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
Hi all, I was wondering if anyone knew of a way to change the default C-runtime heap for a DLL. I would like a DLL that I am creating to automatically allocate its data into a different heap than the host process, and I dont really want to resort to writing my own heap manager or using the Win32 heap functions to manage memory. Thanks
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!Correct me if I am wrong, but I always thought, that the dlls have they own heap - therefore if you malloc something in DLL you are not able to free it in the EXE (or another DLL). I am not really sure about that, but it was told me in some years ago, while learning working with DLLs I allocated some resource in DLL1 and tried to free it in DLL2, getting the heap corruption message.