qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/5] hw/riscv/riscv_hart: free the harts array when the objec


From: Peter Maydell
Subject: Re: [PATCH 1/5] hw/riscv/riscv_hart: free the harts array when the object is finalized
Date: Fri, 18 Feb 2022 17:23:07 +0000

On Fri, 18 Feb 2022 at 16:53, Damien Hedde <damien.hedde@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]