review is_zero flag

This commit is contained in:
daanx 2023-04-18 17:18:39 -07:00
parent b845be241a
commit 4d976270eb
6 changed files with 17 additions and 15 deletions

View file

@ -20,6 +20,7 @@ terms of the MIT license.
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <assert.h>
// > mimalloc-test-stress [THREADS] [SCALE] [ITER]
//
@ -106,6 +107,7 @@ static void* alloc_items(size_t items, random_t r) {
uintptr_t* p = (uintptr_t*)custom_calloc(items,sizeof(uintptr_t));
if (p != NULL) {
for (uintptr_t i = 0; i < items; i++) {
assert(p[i] == 0);
p[i] = (items - i) ^ cookie;
}
}