[PATCH] Nano-malloc: Fix for unwanted external heap fragmentation

Keith Packard keithp@keithp.com
Thu Apr 29 22:09:06 GMT 2021


Ola Olsson <ola1olsson@gmail.com> writes:

> Now when I skimmed through the code I couldn't find anything regarding the
> API robustness.
> Do you think you can point me in the right direction?

Allocations of very large or negative amounts now fail appropriately;
there were a few corner cases which did the wrong thing before.

Oh, I also changed the behavior of 'malloc' to always set memory to
zero; that makes the system more consistent in that application failures
to initialize memory now always get the same result. It's a bit slower,
but I feel like the added layer of reliability is worth it.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20210429/a88054e6/attachment.sig>


More information about the Newlib mailing list