Test and fix tcache ID recycling.

This commit is contained in:
Jason Evans
2015-02-10 09:03:48 -08:00
parent 1cb181ed63
commit 9e561e8d3f
2 changed files with 13 additions and 1 deletions

View File

@@ -451,7 +451,7 @@ tcaches_create(tsd_t *tsd, unsigned *r_ind)
elm = tcaches_avail;
tcaches_avail = tcaches_avail->next;
elm->tcache = tcache;
*r_ind = (elm - tcaches) / sizeof(tcaches_t);
*r_ind = elm - tcaches;
} else {
elm = &tcaches[tcaches_past];
elm->tcache = tcache;