[PATCH 1/2] command: Allocate history buffer using calloc()
Marek Vasut
marek.vasut at mailbox.org
Sun Dec 3 21:44:07 CET 2023
On 12/3/23 18:44, Simon Glass wrote:
> Hi Marek,
>
> On Sat, 2 Dec 2023 at 13:53, Marek Vasut
> <marek.vasut+renesas at mailbox.org> wrote:
>>
>> The history buffer is currently a static array which can be some
>> 10-40 kiB depending on configuration, and so adds considerably to
>> the U-Boot binary size. Allocate it dynamically instead to reduce
>> the U-Boot binary size.
>>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
>> ---
>> Cc: Simon Glass <sjg at chromium.org>
>> ---
>> common/cli_readline.c | 26 +++++++++++++++++---------
>> 1 file changed, 17 insertions(+), 9 deletions(-)
>
> This is very intriguing...
>
> I would expect this to end up in BSS, so not part of the image, but
> allocated when U-Boot starts.
>
> What do you mean by U-Boot binary size? Which architecture is this?
ARM64 , I spotted it at rcar3_salvator-x_defconfig but it has been a
while since I created those patches , they were on hold for a while .
More information about the U-Boot
mailing list