Make bulk_free() go faster

This commit is contained in:
Justine Tunney 2024-12-23 20:14:01 -08:00
parent 624573207e
commit c8e10eef30
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
13 changed files with 54 additions and 36 deletions

View file

@ -22,7 +22,6 @@
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/intrin/cxaatexit.h"
#include "libc/intrin/kprintf.h"
#include "libc/intrin/safemacros.h"
#include "libc/macros.h"
#include "libc/mem/gc.h"
@ -162,7 +161,7 @@ void *bulk[1024];
void BulkFreeBenchSetup(void) {
size_t i;
for (i = 0; i < ARRAYLEN(bulk); ++i) {
bulk[i] = malloc(rand() % 64);
bulk[i] = rand() % 64 ? malloc(rand() % 64) : 0;
}
}