fix statistics to include padding correctly (issue #301)

This commit is contained in:
daan 2020-10-11 13:14:43 -07:00
parent 5d2b925f3e
commit 7114d5424a
4 changed files with 53 additions and 25 deletions

View file

@ -123,7 +123,7 @@ static void free_items(void* p) {
static void stress(intptr_t tid) {
//bench_start_thread();
uintptr_t r = (tid * 43); // rand();
uintptr_t r = ((tid + 1) * 43); // rand();
const size_t max_item_shift = 5; // 128
const size_t max_item_retained_shift = max_item_shift + 2;
size_t allocs = 100 * ((size_t)SCALE) * (tid % 8 + 1); // some threads do more