Memory management in Cygwin

Mumit Khan khan@NanoTech.Wisc.EDU
Wed Mar 22 15:24:00 GMT 2000


On Wed, 22 Mar 2000, Alex wrote:

>  Thanks for help, but it still isn't clear for me, how the memory management
> is done in the programs compiled in Cygwin. How about executables build with
> -mno-cygwin option? As I know they don't use any runtime libraries. Does the
> linker put memory optimization code in them?

Programs compiled/linked with -mno-cygwin are *not* Cygwin apps, and the
memory management in that case is provided by Microsoft's runtime library
(CRTDLL in this particular case).

Other than perhaps a few odd embedded systems, pretty much everything else 
in the world uses runtime libraries.

The linker typically has nothing to do with memory management.

Cygwin/Mingw programs use malloc or some package built on top of it, 
and malloc uses OS-specific hooks to allocate chunks of memory and
manages that on behalf of the user. Doug Lea's excellent paper on
his malloc package talks about this issue, and so do plenty of other
articles and books.

I get the feeling that I haven't a clue as to what information you're 
really after. 

Regards,
Mumit



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list