init_cheap and _csbrk

Christopher Faylor
Wed Aug 7 06:57:00 GMT 2002

On Wed, Aug 07, 2002 at 10:51:53AM +0100, Conrad Scott wrote:
>"Christopher Faylor" <> wrote:
>> And even if I got the slop working there would still
>> be a call to VirtualAlloc.  It shouldn't matter since it will
>> be allocating allocated memory but that means it probably isn't
>> really worth it anyway.  So, I've reorganized things one more
>> And, no more slop.
>Good point: I hadn't quite got as far as thinking too clearly
>about what was being optimised.  I bet a call to VirtualAlloc to
>commit an already committed page is cheap and so some optimization
>might be possible, but without instrumenting a few test programs
>who knows what difference it would make.

I was toying with doing something like:

_cfree (cmalloc (HEAP_STR, 2 * page_size))

which would have the effect that I was looking for but decided that
there was no clear win in doing that.


More information about the Cygwin-patches mailing list