This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] malloc per-thread cache ready for review
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: DJ Delorie <dj at redhat dot com>, <libc-alpha at sourceware dot org>
- Cc: <nd at arm dot com>
- Date: Fri, 27 Jan 2017 14:39:04 +0000
- Subject: Re: [patch] malloc per-thread cache ready for review
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <xnpoj9mxg9.fsf@greed.delorie.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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)