From f6ba0e005a2cab6b60cf1aa045931c04a828b450 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Tue, 18 Jun 2024 16:13:40 +0100 Subject: [PATCH] Clangformat --- src/snmalloc/backend/globalconfig.h | 3 +-- src/snmalloc/backend_helpers/buddy.h | 1 - src/snmalloc/backend_helpers/lockrange.h | 7 ++----- src/snmalloc/ds/singleton.h | 2 +- src/snmalloc/pal/pal_consts.h | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/snmalloc/backend/globalconfig.h b/src/snmalloc/backend/globalconfig.h index 3ff97f4f0..3918315bd 100644 --- a/src/snmalloc/backend/globalconfig.h +++ b/src/snmalloc/backend/globalconfig.h @@ -99,8 +99,7 @@ namespace snmalloc if (initialised) return; - with(initialisation_lock, - [&]() { + with(initialisation_lock, [&]() { #ifdef SNMALLOC_TRACING message<1024>("Run init_impl"); #endif diff --git a/src/snmalloc/backend_helpers/buddy.h b/src/snmalloc/backend_helpers/buddy.h index f4895022d..2d9f27bff 100644 --- a/src/snmalloc/backend_helpers/buddy.h +++ b/src/snmalloc/backend_helpers/buddy.h @@ -112,7 +112,6 @@ namespace snmalloc { validate_block(addr, size); - if (remove_buddy(addr, size)) { // Add to next level cache diff --git a/src/snmalloc/backend_helpers/lockrange.h b/src/snmalloc/backend_helpers/lockrange.h index 562051346..2dc796ac6 100644 --- a/src/snmalloc/backend_helpers/lockrange.h +++ b/src/snmalloc/backend_helpers/lockrange.h @@ -36,8 +36,7 @@ namespace snmalloc CapPtr alloc_range(size_t size) { CapPtr result; - with(spin_lock, - [&]() { + with(spin_lock, [&]() { { result = parent.alloc_range(size); } @@ -47,9 +46,7 @@ namespace snmalloc void dealloc_range(CapPtr base, size_t size) { - with(spin_lock, [&]() { - parent.dealloc_range(base, size); - }); + with(spin_lock, [&]() { parent.dealloc_range(base, size); }); } }; }; diff --git a/src/snmalloc/ds/singleton.h b/src/snmalloc/ds/singleton.h index af486c5bd..375a82f87 100644 --- a/src/snmalloc/ds/singleton.h +++ b/src/snmalloc/ds/singleton.h @@ -35,7 +35,7 @@ namespace snmalloc if (SNMALLOC_UNLIKELY(!initialised.load(std::memory_order_acquire))) { - with (flag, [&](){ + with(flag, [&]() { if (!initialised) { init(&obj); diff --git a/src/snmalloc/pal/pal_consts.h b/src/snmalloc/pal/pal_consts.h index e9bf2648c..3c7fd58db 100644 --- a/src/snmalloc/pal/pal_consts.h +++ b/src/snmalloc/pal/pal_consts.h @@ -55,7 +55,7 @@ namespace snmalloc * This Pal provides a millisecond time source */ Time = (1 << 5), - + /** * This Pal provides selective core dumps, so * modify which parts get dumped.