|
From: | Denis V. Lunev |
Subject: | Re: [Qemu-devel] [PATCH 1/2] migration: bitmap_set is unnecessary as bitmap_new uses g_try_malloc0 |
Date: | Fri, 25 Sep 2015 13:05:00 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 09/25/2015 12:37 PM, Wen Congyang wrote:
On 09/25/2015 05:31 PM, Denis V. Lunev wrote:On 09/25/2015 12:24 PM, Wen Congyang wrote:On 09/25/2015 05:09 PM, Denis V. Lunev wrote:we can omit calling of bitmap_set in migration_bitmap_extend and ram_save_setup just after bitmap_new, which properly zeroes memory inside.This patch is wrong. bitmap_set() is set all bits of the memory to 1, not 0.OK, then I'll replace g_try_malloc0 with g_try_malloc in the next patch to avoid double memsetNo, bitmap_new() is called in many places. Some caller needs zero memory, and some caller doesn't need...
you are correct with your proposal with double allocation for the next patch.
With a specific function like I have did in v2 g_try_malloc0 can be replaced.Anyway, I am fine with your proposal, this is not a (very) big deal. EINPROGRESS
Den
[Prev in Thread] | Current Thread | [Next in Thread] |