public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Memory management in Cygwin
@ 2000-03-19 11:26 Alex
  2000-03-19 14:27 ` Mumit Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Alex @ 2000-03-19 11:26 UTC (permalink / raw)
  To: cygwin

Hi all!
I'm interested to know if C/C++ compilers in Cygwin somehow optimize
memory allocation/deallocation routines like getting large blocks from
OS and then redistributing small portions to the program.
Thanks for help!


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Memory management in Cygwin
  2000-03-19 11:26 Memory management in Cygwin Alex
@ 2000-03-19 14:27 ` Mumit Khan
  2000-03-22  9:52   ` Alex
  0 siblings, 1 reply; 4+ messages in thread
From: Mumit Khan @ 2000-03-19 14:27 UTC (permalink / raw)
  To: Alex; +Cc: cygwin

On Sun, 19 Mar 2000, Alex wrote:

> I'm interested to know if C/C++ compilers in Cygwin somehow optimize
> memory allocation/deallocation routines like getting large blocks from
> OS and then redistributing small portions to the program.
> Thanks for help!

It's not the compilers, but rather the runtime that manage the memory
pools, and yes, Cygwin's memory manager does do pool optimization just
like every other `malloc' package out there.

Cygwin's malloc is based on, as far as I can tell, Doug Lea's public
domain implementation. See his homepage http://g.oswego.edu/index.html
for the design document (go down to the "Software" section).

Regards,
Mumit



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Memory management in Cygwin
  2000-03-19 14:27 ` Mumit Khan
@ 2000-03-22  9:52   ` Alex
  2000-03-22 15:24     ` Mumit Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Alex @ 2000-03-22  9:52 UTC (permalink / raw)
  To: Mumit Khan; +Cc: cygwin

Mumit Khan wrote:

> On Sun, 19 Mar 2000, Alex wrote:
>
> > I'm interested to know if C/C++ compilers in Cygwin somehow optimize
> > memory allocation/deallocation routines like getting large blocks from
> > OS and then redistributing small portions to the program.
> > Thanks for help!
>
> It's not the compilers, but rather the runtime that manage the memory
> pools, and yes, Cygwin's memory manager does do pool optimization just
> like every other `malloc' package out there.
>
> Cygwin's malloc is based on, as far as I can tell, Doug Lea's public
> domain implementation. See his homepage http://g.oswego.edu/index.html
> for the design document (go down to the "Software" section).
>
> Regards,
> Mumit

 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?



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Memory management in Cygwin
  2000-03-22  9:52   ` Alex
@ 2000-03-22 15:24     ` Mumit Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Mumit Khan @ 2000-03-22 15:24 UTC (permalink / raw)
  To: Alex; +Cc: cygwin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-03-22 15:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-19 11:26 Memory management in Cygwin Alex
2000-03-19 14:27 ` Mumit Khan
2000-03-22  9:52   ` Alex
2000-03-22 15:24     ` Mumit Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).