Re: improve realloc(3)

2017-01-12 Thread Otto Moerbeek
On Mon, Jan 09, 2017 at 07:49:24PM +0100, Otto Moerbeek wrote: > Hi, > > this diff implements some improvements to realloc and some cleanup of > the MALLOC_MOVE code. > > 1. When shrinking a chunk allocation, compare the size of the current > allocation to the size of the new allocation

improve realloc(3)

2017-01-09 Thread Otto Moerbeek
Hi, this diff implements some improvements to realloc and some cleanup of the MALLOC_MOVE code. 1. When shrinking a chunk allocation, compare the size of the current allocation to the size of the new allocation (instead of the requested size). Current code does a malloc-free-copy dance in too