Skip to content

Commit 3f7de91

Browse files
committed
Clangformat
1 parent 5ee70bd commit 3f7de91

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

src/snmalloc/global/globalalloc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ namespace snmalloc
8585
}
8686

8787
if (result == nullptr)
88-
SNMALLOC_CHECK(RemoteDeallocCache<Config_>::remote_inflight.get_curr() == 0);
88+
SNMALLOC_CHECK(
89+
RemoteDeallocCache<Config_>::remote_inflight.get_curr() == 0);
8990

9091
if (result != nullptr)
9192
{

src/snmalloc/mem/alloc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,8 @@ namespace snmalloc
531531

532532
bytes_freed += objsize * length;
533533

534-
stats[entry.get_sizeclass()].objects_deallocated += static_cast<size_t>(length);
534+
stats[entry.get_sizeclass()].objects_deallocated +=
535+
static_cast<size_t>(length);
535536

536537
// Update the head and the next pointer in the free list.
537538
meta->free_queue.append_segment(

src/test/func/alloc_churn/alloc_churn.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ int main()
2323
{
2424
for (size_t i = 0; i < 10000; i++)
2525
{
26-
if (i % 1000 == 0) {
26+
if (i % 1000 == 0)
27+
{
2728
std::cout << "Step " << i << std::endl;
2829
snmalloc::print_alloc_stats();
2930
}

src/test/func/statistics/stats.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ void debug_check_empty_1()
1919
abort();
2020
}
2121

22-
snmalloc::print_alloc_stats();
22+
snmalloc::print_alloc_stats();
2323

24-
snmalloc::dealloc(r);
24+
snmalloc::dealloc(r);
2525

2626
snmalloc::print_alloc_stats();
2727

src/test/perf/batchblitz/batchblitz.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ int main()
8787
}
8888
stop = true;
8989

90-
91-
9290
for (auto& t : thread_pool)
9391
t.join();
9492
}

src/test/perf/churn/churn.cc

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,25 @@ int main()
6565
count++;
6666
std::this_thread::sleep_for(std::chrono::seconds(1));
6767
// std::cout << "Inflight: " <<
68-
// snmalloc::RemoteDeallocCache<snmalloc::Config>::remote_inflight << std::endl; std::cout
68+
// snmalloc::RemoteDeallocCache<snmalloc::Config>::remote_inflight <<
69+
// std::endl; std::cout
6970
// << "Current reservation: " << snmalloc::Globals::get_current_usage() <<
7071
// std::endl; std::cout << "Peak reservation: " <<
7172
// snmalloc::Globals::get_peak_usage() << std::endl; std::cout <<
7273
// "Allocator count: " << snmalloc::Globals::pool().get_count() <<
7374
// std::endl; std::cout << "Running threads: " << running <<
7475
// std::endl; std::cout << "Index: " << count << std::endl;
7576
// std::cout << "------------------------------------------" << std::endl;
76-
std::cout << count << ","
77-
<< snmalloc::Alloc::Config::Backend::get_peak_usage() << ","
78-
<< snmalloc::Alloc::Config::Backend::get_current_usage() << ","
79-
<< requests.get_curr() << "," << requests.get_peak() << ","
80-
<< snmalloc::RemoteDeallocCache<snmalloc::Config>::remote_inflight.get_peak()
81-
<< ","
82-
<< snmalloc::RemoteDeallocCache<snmalloc::Config>::remote_inflight.get_curr()
83-
<< std::endl;
77+
std::cout
78+
<< count << "," << snmalloc::Alloc::Config::Backend::get_peak_usage()
79+
<< "," << snmalloc::Alloc::Config::Backend::get_current_usage() << ","
80+
<< requests.get_curr() << "," << requests.get_peak() << ","
81+
<< snmalloc::RemoteDeallocCache<snmalloc::Config>::remote_inflight
82+
.get_peak()
83+
<< ","
84+
<< snmalloc::RemoteDeallocCache<snmalloc::Config>::remote_inflight
85+
.get_curr()
86+
<< std::endl;
8487
snmalloc::print_alloc_stats();
8588
}
8689
}).join();

0 commit comments

Comments
 (0)