mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 13:13:06 +00:00
Replace unsigned induction variable with size_t in background_threads_enable
This patch avoids unnecessary vectorizations in clang and missed recognition of memset in gcc. See also https://godbolt.org/z/aoeMsjr4c.
This commit is contained in:
@@ -580,7 +580,7 @@ background_threads_enable(tsd_t *tsd) {
|
|||||||
|
|
||||||
VARIABLE_ARRAY(bool, marked, max_background_threads);
|
VARIABLE_ARRAY(bool, marked, max_background_threads);
|
||||||
unsigned nmarked;
|
unsigned nmarked;
|
||||||
for (unsigned i = 0; i < max_background_threads; i++) {
|
for (size_t i = 0; i < max_background_threads; i++) {
|
||||||
marked[i] = false;
|
marked[i] = false;
|
||||||
}
|
}
|
||||||
nmarked = 0;
|
nmarked = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user