This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] cygheap.cc: Allow _crealloc to shrink memory-block.


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
>be shrunk.
>
>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.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]