qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 1/7] dmg: Introduce a new struct to cache ran


From: Stefan Hajnoczi
Subject: Re: [Qemu-block] [PATCH v2 1/7] dmg: Introduce a new struct to cache random access points
Date: Fri, 5 May 2017 14:12:56 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

On Thu, Apr 27, 2017 at 01:36:31PM +0530, Ashijeet Acharya wrote:
> @@ -51,6 +60,7 @@ typedef struct BDRVDMGState {
>      uint8_t *compressed_chunk;
>      uint8_t *uncompressed_chunk;
>      z_stream zstream;
> +    DMGReadState *drs;

This doesn't need to be a pointer.  The object is allocated in
.bdrv_open() and freed in .bdrv_close().  It's simpler to drop the heap
allocation and simply inline the struct:

    DMGReadState drs;

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]