On 2/18/22 18:23, Peter Maydell wrote:
On Fri, 18 Feb 2022 at 16:53, Damien Hedde <damien.he...@greensocs.com> wrote:

The array is dynamically allocated by realize() depending on the
number of harts.

This clean-up removes memory leaks which would happen in the
'init->finalize' life-cycle use-case (happening when user creation
is allowed).

If the allocation happens in realize, then it won't hapen
in an init->finalize cycle, only in init->realize->unrealize->finalize...

-- PMM

You're right. I was confused when re-writing the message.
This leaks happen on
init -> realize-failure -> finalize
Because the array is allocated, then every cpu is initialized (and an error failure may happen for any of them).

Thanks,
--
Damien


Reply via email to