diff --git a/src/mem/globalalloc.h b/src/mem/globalalloc.h index cf90567..591a70b 100644 --- a/src/mem/globalalloc.h +++ b/src/mem/globalalloc.h @@ -108,9 +108,9 @@ namespace snmalloc } /** - If you pass a pointer to a bool, then it returns whether all the allocators are empty. - If you don't pass a pointer to a bool, then will raise an error all the allocators are - not empty. + If you pass a pointer to a bool, then it returns whether all the + allocators are empty. If you don't pass a pointer to a bool, then will + raise an error all the allocators are not empty. */ void debug_check_empty(bool* result = nullptr) { @@ -133,7 +133,7 @@ namespace snmalloc // Destroy the message queue so that it has no stub message. Remote* p = alloc->message_queue().destroy(); - while (p != nullptr) + while (p != nullptr) { Remote* next = p->non_atomic_next; alloc->handle_dealloc_remote(p); diff --git a/src/test/func/statistics/stats.cc b/src/test/func/statistics/stats.cc index 76ac2f1..6ecbe09 100644 --- a/src/test/func/statistics/stats.cc +++ b/src/test/func/statistics/stats.cc @@ -1,12 +1,10 @@ #include - - int main() { snmalloc::Alloc* a = snmalloc::ThreadAlloc::get(); bool result; - + auto r = a->alloc(16); snmalloc::current_alloc_pool()->debug_check_empty(&result); @@ -19,7 +17,7 @@ int main() snmalloc::current_alloc_pool()->debug_check_empty(&result); if (result != true) - { + { abort(); } @@ -35,7 +33,7 @@ int main() snmalloc::current_alloc_pool()->debug_check_empty(&result); if (result != true) - { + { abort(); } } \ No newline at end of file