[Spice-devel] [PATCH spice-server 1/3] glz-encoder-dict: Remove useless __packed__ attribute

Victor Toso victortoso at redhat.com
Fri Aug 2 09:19:25 UTC 2019


Hi,

On Mon, Jul 22, 2019 at 12:08:39PM +0100, Frediano Ziglio wrote:
> The structure has no holes, adding this attribute could only
> decrease efficiency.

Why does it decrease efficiency?

> Note that HashEntry structure is used for a large (8MB) array so
> this won't affect much possible container size.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/glz-encoder-priv.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/glz-encoder-priv.h b/server/glz-encoder-priv.h
> index 08dc007ce..7757f232c 100644
> --- a/server/glz-encoder-priv.h
> +++ b/server/glz-encoder-priv.h
> @@ -76,7 +76,7 @@ struct WindowImageSegment {
>  };
>  
>  
> -struct  __attribute__ ((__packed__)) HashEntry {
> +struct HashEntry {
>      uint32_t image_seg_idx;
>      uint32_t ref_pix_idx;
>  };
> -- 
> 2.20.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190802/008e45d5/attachment.sig>


More information about the Spice-devel mailing list