* [PATCH v1] libxc: use bitmap_alloc
@ 2020-09-09 9:53 Olaf Hering
2020-09-09 10:01 ` Andrew Cooper
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2020-09-09 9:53 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian Jackson, Wei Liu
Use existing helper to allocate a bitmap.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/libxc/xc_sr_save.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c
index 80b1d5de1f..bc5a1a723c 100644
--- a/tools/libxc/xc_sr_save.c
+++ b/tools/libxc/xc_sr_save.c
@@ -809,7 +809,7 @@ static int setup(struct xc_sr_context *ctx)
xch, dirty_bitmap, NRPAGES(bitmap_size(ctx->save.p2m_size)));
ctx->save.batch_pfns = malloc(MAX_BATCH_SIZE *
sizeof(*ctx->save.batch_pfns));
- ctx->save.deferred_pages = calloc(1, bitmap_size(ctx->save.p2m_size));
+ ctx->save.deferred_pages = bitmap_alloc(ctx->save.p2m_size);
if ( !ctx->save.batch_pfns || !dirty_bitmap || !ctx->save.deferred_pages )
{
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] libxc: use bitmap_alloc
2020-09-09 9:53 [PATCH v1] libxc: use bitmap_alloc Olaf Hering
@ 2020-09-09 10:01 ` Andrew Cooper
2020-09-09 11:10 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2020-09-09 10:01 UTC (permalink / raw)
To: Olaf Hering, xen-devel; +Cc: Ian Jackson, Wei Liu
On 09/09/2020 10:53, Olaf Hering wrote:
> Use existing helper to allocate a bitmap.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] libxc: use bitmap_alloc
2020-09-09 10:01 ` Andrew Cooper
@ 2020-09-09 11:10 ` Wei Liu
0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2020-09-09 11:10 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Olaf Hering, xen-devel, Ian Jackson, Wei Liu
On Wed, Sep 09, 2020 at 11:01:19AM +0100, Andrew Cooper wrote:
> On 09/09/2020 10:53, Olaf Hering wrote:
> > Use existing helper to allocate a bitmap.
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
I've rebased pushed this patch to staging to save another round of
posting. Please check if there is any issue.
Wei.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-09 11:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 9:53 [PATCH v1] libxc: use bitmap_alloc Olaf Hering
2020-09-09 10:01 ` Andrew Cooper
2020-09-09 11:10 ` Wei Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.