This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] malloc per-thread cache ready for review


On 26/01/17 19:29, DJ Delorie wrote:
> +typedef struct TCache {
> +  /* 0 = uninitted, 1 = normal, anything else = shutting down */
> +  char initted;
> +  char counts[TCACHE_IDX];
> +  TCacheEntry *entries[TCACHE_IDX];
> +} TCache;
> +
> +static __thread TCache tcache = {0,0,0,{0},{0}};

this initializer seems to have two excess 0

(i'd just remove the initializer if it's static __thread)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]