mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-28 11:23:08 +03:00
Fix static analysis warnings.
This commit is contained in:
parent
e4817c8d89
commit
eda05b3994
9 changed files with 33 additions and 15 deletions
|
|
@ -460,8 +460,12 @@ arena_bind(tsd_t *tsd, unsigned ind, bool internal) {
|
|||
tsd_iarena_set(tsd, arena);
|
||||
} else {
|
||||
tsd_arena_set(tsd, arena);
|
||||
unsigned shard = atomic_fetch_add_u(&arena->binshard_next, 1,
|
||||
ATOMIC_RELAXED);
|
||||
/*
|
||||
* While shard acts as a random seed, the cast below should
|
||||
* not make much difference.
|
||||
*/
|
||||
uint8_t shard = (uint8_t)atomic_fetch_add_u(
|
||||
&arena->binshard_next, 1, ATOMIC_RELAXED);
|
||||
tsd_binshards_t *bins = tsd_binshardsp_get(tsd);
|
||||
for (unsigned i = 0; i < SC_NBINS; i++) {
|
||||
assert(bin_infos[i].n_shards > 0 &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue