mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
review is_zero flag
This commit is contained in:
parent
b845be241a
commit
4d976270eb
6 changed files with 17 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue