[PATCH 3/4] libm/stdlib: Realloc when shrinking by 2* or more

Corinna Vinschen vinschen@redhat.com
Mon Aug 17 09:54:10 GMT 2020


On Aug 13 17:48, Keith Packard via Newlib wrote:
> Corinna Vinschen <vinschen@redhat.com> writes:
> 
> > Just as I wrote above.
> 
> Done. In reviewing this code further, I've done a bunch more
> restructuring to make the code 64-bit clean, removing the 'offset'
> mechanism and letting the compiler compute alignment requirements for
> us. The diff for that is pretty large though; would there be an interest
> in looking at it? I ask because preparing that patch for newlib would
> take several hours as it's currently only in picolibc.
> 
> https://github.com/keith-packard/picolibc/commit/fd2d18bb5ab442f16789c243648d07b4ec8e2b29
> 
> This also uncovers problems when building with newer GCC versions which
> "helpfully optimize" common malloc/free operations that cause incorrect
> code to be generated in some configurations of the library.
> 
> -- 
> -keith

I took a brief look and I'm just wondering why you don't mention
renaming the functions and dropping the wrapper macros in the commit
message.

As for interest, we may want to ask the ARM guys since they provided the
code originally.  Cc'ing Szabolcs as well as Joey, the original author.


Corinna



More information about the Newlib mailing list