This is the mail archive of the
mailing list for the Cygwin project.
Re: [Patch] cygheap.cc: Allow _crealloc to shrink memory-block.
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 12 Oct 2004 18:31:30 -0400
- Subject: Re: [Patch] cygheap.cc: Allow _crealloc to shrink memory-block.
- References: <email@example.com>
- Reply-to: cygwin-patches at cygwin dot com
On Wed, Oct 13, 2004 at 12:11:24AM +0200, Bas van Gompel wrote:
>Following (trivial IMO) patch, allows memory blocks on the cygheap to
>There are some issues with this:
>- The code is slightly slower.
>- This change is in a block of code marked ``copyright D. J. Delorie''.
>- I'm not sure _crealloc is ever called with a smaller size. (If it
> isn't, this patch is useless.)
>(I did test this, and it WJFFM.)
Thanks, but I don't see any reason to go to the effort of allocating a
new block of memory in order to get a smaller block of memory. The
overhead of allocating memory, which could actually cause a call to the
OS, shouldn't be worth it unless you're suffering from severe memory
constraints. I don't believe that is normally the case for cygheap.