Reformat the codebase with the clang-format 18.

This commit is contained in:
guangli-dai
2025-06-13 12:31:12 -07:00
committed by Guangli Dai
parent a952a3b8b0
commit 6200e8987f
346 changed files with 18286 additions and 17770 deletions

View File

@@ -1,6 +1,7 @@
#include "test/jemalloc_test.h"
static void assert_small_allocation_sampled(void *ptr, size_t size) {
static void
assert_small_allocation_sampled(void *ptr, size_t size) {
assert_ptr_not_null(ptr, "Unexpected malloc failure");
assert_zu_le(size, SC_SMALL_MAXCLASS, "Unexpected large size class");
edata_t *edata = emap_edata_lookup(TSDN_NULL, &arena_emap_global, ptr);
@@ -24,7 +25,7 @@ TEST_BEGIN(test_profile_small_allocations) {
for (szind_t index = 0; index < SC_NBINS; index++) {
size_t size = sz_index2size(index);
void *ptr = malloc(size);
void *ptr = malloc(size);
assert_small_allocation_sampled(ptr, size);
free(ptr);
}
@@ -36,7 +37,7 @@ TEST_BEGIN(test_profile_small_allocations_sdallocx) {
for (szind_t index = 0; index < SC_NBINS; index++) {
size_t size = sz_index2size(index);
void *ptr = malloc(size);
void *ptr = malloc(size);
assert_small_allocation_sampled(ptr, size);
/*
* While free calls into ifree, sdallocx calls into isfree,
@@ -86,7 +87,7 @@ TEST_BEGIN(test_profile_small_reallocations_same_size_class) {
for (szind_t index = 0; index < SC_NBINS; index++) {
size_t size = sz_index2size(index);
void *ptr = malloc(size);
void *ptr = malloc(size);
assert_small_allocation_sampled(ptr, size);
ptr = realloc(ptr, size - 1);
assert_small_allocation_sampled(ptr, size);