[PATCH 0/8] malloc: implement USE_DL_PREFIX using inline functions
Simon Glass
sjg at chromium.org
Thu Feb 20 04:05:04 CET 2020
Hi Simon,
On Wed, 19 Feb 2020 at 12:39, Simon Goldschmidt
<simon.k.r.goldschmidt at gmail.com> wrote:
>
> Commit cfda60f99ae2 ("sandbox: Use a prefix for all allocation functions")
> introduced preprocessor macros for malloc/free etc.
>
> This is bad practice as it essentially makes 'free' a reserved keyword and
> resulted in quite a bit of renaming to avoid that reserved keyword.
>
> A better solution is to define the allocation functions as 'static inline'.
>
> This should go in before the release, as it's a regression not seen before
> the last release.
>
> A side-effect is that exports.h may not declare malloc/free. I'm not really
> sure if this is correct, but for sandbox, it should probably be ok?
Well it is OK for now, until we want to add tests for the API.
Tom may have a better idea on this.
Regards,
Simon
More information about the U-Boot
mailing list