mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxenguest: use bitmap_alloc
Use existing helper to allocate a bitmap. Signed-off-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> [ wei: rebase to staging ] Signed-off-by: Wei Liu <wl@xen.org>
This commit is contained in:
1 parent
b72aa3968d
commit
3cccdae452
1 file changed
+1
-1
@@ -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 )
|
||||
{
|
||||
|
||||