Re: [PATCH v3 13/13] verification/rvgen: Generate cleanup hook for per-obj monitor

From: Nam Cao

Date: Mon Jun 01 2026 - 04:09:06 EST


Gabriele Monaco <gmonaco@xxxxxxxxxx> writes:

> Per-object monitors can allocate memory dynamically and such memory is
> required for the lifetime of the object, then it should be freed with
> the appropriate call.
>
> Force the generation scripts to add a cleanup function the user will
> need to wire to the appropriate event (e.g. sched_process_exit for
> tasks). This can be safely removed if the object will never cease to
> exist before disabling the monitor (e.g. if following only static
> variables).
>
> Signed-off-by: Gabriele Monaco <gmonaco@xxxxxxxxxx>

Reviewed-by: Nam Cao <namcao@xxxxxxxxxxxxx>