Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Fri, 7 Apr 2006 11:28:02 -0700,    group: microsoft.public.win32.programmer.tools        back       


CRT heap in DLL   
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.
date: Fri, 7 Apr 2006 11:28:02 -0700   author:   Yury

Re:CRT heap in DLL   
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
date: Sat, 8 Apr 2006 13:58:21 -0500   author:   anton bassov

Re: CRT heap in DLL   
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.
>
>
date: Sat, 8 Apr 2006 13:04:06 -0700   author:   Bob Milton am

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us