Clangformat

This commit is contained in:
Matthew Parkinson
2019-08-13 13:27:33 +01:00
parent 2ab4bb4366
commit bef2fb94d8
2 changed files with 7 additions and 9 deletions

View File

@@ -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);

View File

@@ -1,12 +1,10 @@
#include <snmalloc.h>
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();
}
}