Make cache_bin_sz_t unsigned.

The bin size type was made signed only because the low_water could go -1, which
was already removed.
This commit is contained in:
Qi Wang
2019-08-30 11:52:15 -07:00
committed by Qi Wang
parent 23dc7a7fba
commit 785b84e603
2 changed files with 8 additions and 10 deletions

View File

@@ -825,6 +825,8 @@ tcache_boot(tsdn_t *tsdn) {
ncached_max = TCACHE_NSLOTS_SMALL_MAX;
}
unsigned stack_size = ncached_max * sizeof(void *);
assert(stack_size < ((uint64_t)1 <<
(sizeof(cache_bin_sz_t) * 8)));
tcache_bin_info[i].stack_size = stack_size;
total_stack_bytes += stack_size;
}