[U-Boot] [PATCH 1/2] bouncebuf: Add static buffer allocation method for SPL.

Marek Vasut marex at denx.de
Tue May 7 13:52:21 UTC 2019


On 5/7/19 3:45 PM, Christoph Müllner wrote:
> 
> 
> On 07.05.19 15:06, Marek Vasut wrote:
>> On 5/7/19 11:09 AM, Christoph Muellner wrote:
>>> If we are using malloc-simple, we get into the problem, that
>>> calls to free() won't free any memory. When using bouncebuf
>>> in SPL with malloc-simple this means, that every allocated buffer
>>> is lost. This can quickly consume the whole heap.
>>
>> When does such a scenario happen ?
> 
> RK3399 with mainline U-Boot and mainline ATF.
> We have 0x4000 bytes heap in SPL.
> For the SRAM part of ATF we need to allocate 0x2000-0x2200 bytes.
> For the PMUSRAM part about the same again.
> 
> I tried to increase the heap size to 0x10000, but that seems
> to break some unchecked assumptions about the memory layout,
> because then SPL resets very early.

So what calls this malloc-free pair so often to spend all the simple
malloc area ?

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list