← Back to team overview

maria-developers team mailing list archive

Re: [Commits] 9f7e77b: MDEV-10296 - Multi-instance table cache

 

Hi, Sergey!

On Sep 07, Sergey Vojtovich wrote:
> revision-id: 9f7e77b5414b5b2ef9b5f50f131966821fefb9c7 (mariadb-10.1.8-229-g9f7e77b)
> parent(s): 58634f6e50b40b28533a03a1afcb68f139937351
> committer: Sergey Vojtovich
> timestamp: 2016-09-07 12:47:43 +0400
> message:
> 
> MDEV-10296 - Multi-instance table cache
> 
> - simplified access to per-share free tables list
> - explain paddings
> 
> @@ -43,7 +52,9 @@ struct TDC_element
>      for this share.
>    */
>    All_share_tables_list all_tables;
> -  char pad[CPU_LEVEL1_DCACHE_LINESIZE]; // free_tables follows this immediately
> +  /** Avoid false sharing between TDC_element and free_tables */
> +  char pad[CPU_LEVEL1_DCACHE_LINESIZE];
> +  Share_free_tables free_tables[0];
>  };

I vaguely remember that zero-length arrays are not supported
by some compilers (they're gcc extension, after all).

So I generally use [1] in cases like this, not [0].

Otherwise ok.

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


Follow ups