[PATCH v2 2/7] common: Tidy up how malloc() is inited

Tom Rini trini at konsulko.com
Sat Oct 12 03:33:18 CEST 2024


On Sat, Oct 12, 2024 at 01:25:37AM +0200, Heinrich Schuchardt wrote:
> 
> 
> Am 11. Oktober 2024 23:40:26 MESZ schrieb Simon Glass <sjg at chromium.org>:
> >The call to malloc() is a bit strange. The naming of the arguments
> >suggests that an address is passed, but in fact it is a pointer, at
> >least in the board_init_r() function and SPL equivalent.
> 
> 
> Please, do not push sandbox only code deeper into malloc.
> 
> We should strive to get rid of the sandbox only virtual address space whereever we can.

I don't think it's possible to get rid of map_sysmem() and friends, so
this is I think quite reasonable as it starts moving the detail from
every caller and to the core places where it's needed.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241011/526b27d9/attachment.sig>


More information about the U-Boot mailing list