Add more missing C / C++ headers

This commit is contained in:
Justine Tunney 2022-09-04 04:53:52 -07:00
parent b9dc74b672
commit 8dd4ec68d0
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
152 changed files with 30711 additions and 6267 deletions

View file

@ -19,8 +19,8 @@
#include "libc/dce.h"
#include "libc/intrin/asan.internal.h"
#include "libc/mem/mem.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/gc.internal.h"
#include "libc/stdio/rand.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/testlib.h"
@ -68,11 +68,18 @@ TEST(bzero, hug) {
BENCH(memset, bench) {
int n, max = 8 * 1024 * 1024;
char *volatile p = gc(malloc(max));
EZBENCH_N("memset", 0, memset(p, -1, 0));
for (n = 2; n <= max; n *= 2) {
EZBENCH_N("memset", n - 1, memset(p, -1, n - 1));
EZBENCH_N("memset", n, memset(p, -1, n));
}
EZBENCH_N("memset16", 0, memset16((char16_t *)p, -1, 0));
for (n = 2; n <= max; n *= 2) {
EZBENCH_N("memset16", n, memset16((char16_t *)p, -1, n / 2));
}
EZBENCH_N("bzero", 0, bzero(p, 0));
for (n = 2; n <= max; n *= 2) {
EZBENCH_N("bzero", n - 1, bzero(p, n - 1));