used to believe that each process has a default heap shared by everybody in the process space including code in loaded DLL and heap manager works as described in http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dngenlib/html/msdn_heapmm.asp Then I’ve found out that if DLLs are linked with CRT each has own heap manager http://msdn2.microsoft.com/en-US/library/ms235460.aspx My questions: how those individual default heaps are allocated and grow if the DLL needs more memory? What is their initial size and limit? My application is ISAPI filter/extension that runs out of memory once in a while. I want to know how to deal with the condition.
Hi mate The most obvious solution to your task is to avoid calling heap-related functions that are implemented by CRT (malloc(),calloc(),etc), and, instead, just to use heap functions that are exported by kernel32.dll (CRT calls them behind the scenes anyway). As a result, you will always be able to tell what's going on Regards Anton Bassov
If you are using the shared DLL version of the CRT, there is only one in any process. Any Dlls loaded by that process use the shared copy. What gets you in trouble is mixing Dlls compiled with different compilers (each with a different CRT Dll), static linking parts of the program (separate copies of the CRT in each static link), and things like that. Bob "Yury" wrote in message news:2D5D2B61-2849-42D6-AC62-4BDC52E55419@microsoft.com... > used to believe that each process has a default heap shared by everybody > in > the process space including code in loaded DLL and heap manager works as > described in > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dngenlib/html/msdn_heapmm.asp > > Then I've found out that if DLLs are linked with CRT each has own heap > manager http://msdn2.microsoft.com/en-US/library/ms235460.aspx > > My questions: how those individual default heaps are allocated and grow if > the DLL needs more memory? What is their initial size and limit? > > > > My application is ISAPI filter/extension that runs out of memory once in a > while. I want to know how to deal with the condition. > >