On Wed, Jun 28, 2017 at 08:49:32AM -0400, Alexey Perevalov wrote:

[...]

> @@ -2324,8 +2352,14 @@ static int ram_load_setup(QEMUFile *f, void *opaque)

[1]

>  
>  static int ram_load_cleanup(void *opaque)
>  {
> +    RAMBlock *rb;
>      xbzrle_load_cleanup();
>      compress_threads_load_cleanup();
> +
> +    RAMBLOCK_FOREACH(rb) {
> +        g_free(rb->receivedmap);
> +        rb->receivedmap = NULL;
> +    }
>      return 0;
>  }

Can we put init into ram_load_setup()? (I don't have the codes, but I
see this function above at [1], I suppose it'll be called on dest side
before migration really starts?)

Sorry for my harshness, but this just looks weird. I am not asking
that we _must_ put it somewhere outside RAM codes, but at least I
think they should be paired. If you cleanup the bitmap in RAM code,
why not you init it in RAM code as well? Did I miss anything again?

-- 
Peter Xu

Reply via email to