microsoft / snmalloc

Message passing based allocator
MIT License
1.58k stars 109 forks source link

Further gcc -Werror=array-bounds fix #678

Closed nwf closed 2 months ago

nwf commented 2 months ago

In test/perf/startup, gcc (Debian 14.2.0-3) seems to get confused about the size of the counters vector as the code was written. Rewrite the code to pass the same value (std::thread::hardware_concurrency(), but in a local) to both counters.resize() and the ParallelTest ctor.