mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-19 11:26:26 +03:00
Reformat the codebase with the clang-format 18.
This commit is contained in:
parent
0a6215c171
commit
f1bba4a87c
346 changed files with 18286 additions and 17770 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue