Skip to content

Commit 404a8e9

Browse files
authored
Fix malloc_bench calloc logic (#20648)
1 parent 2f66f2e commit 404a8e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/malloc_bench.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ void randoms() {
8686
}
8787
} else {
8888
if (calloc_ && USE_CALLOC) {
89-
bins[bin] = malloc(size);
89+
bins[bin] = calloc(size, 1);
9090
allocated[bin] = size;
9191
total_allocated += size;
9292
} else {
93-
bins[bin] = calloc(size, 1);
93+
bins[bin] = malloc(size);
9494
allocated[bin] = size;
9595
total_allocated += size;
9696
}

0 commit comments

Comments
 (0)