Clangformat
This commit is contained in:
@@ -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 pass a pointer to a bool, then it returns whether all the
|
||||||
If you don't pass a pointer to a bool, then will raise an error all the allocators are
|
allocators are empty. If you don't pass a pointer to a bool, then will
|
||||||
not empty.
|
raise an error all the allocators are not empty.
|
||||||
*/
|
*/
|
||||||
void debug_check_empty(bool* result = nullptr)
|
void debug_check_empty(bool* result = nullptr)
|
||||||
{
|
{
|
||||||
@@ -133,7 +133,7 @@ namespace snmalloc
|
|||||||
// Destroy the message queue so that it has no stub message.
|
// Destroy the message queue so that it has no stub message.
|
||||||
Remote* p = alloc->message_queue().destroy();
|
Remote* p = alloc->message_queue().destroy();
|
||||||
|
|
||||||
while (p != nullptr)
|
while (p != nullptr)
|
||||||
{
|
{
|
||||||
Remote* next = p->non_atomic_next;
|
Remote* next = p->non_atomic_next;
|
||||||
alloc->handle_dealloc_remote(p);
|
alloc->handle_dealloc_remote(p);
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#include <snmalloc.h>
|
#include <snmalloc.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
snmalloc::Alloc* a = snmalloc::ThreadAlloc::get();
|
snmalloc::Alloc* a = snmalloc::ThreadAlloc::get();
|
||||||
bool result;
|
bool result;
|
||||||
|
|
||||||
auto r = a->alloc(16);
|
auto r = a->alloc(16);
|
||||||
|
|
||||||
snmalloc::current_alloc_pool()->debug_check_empty(&result);
|
snmalloc::current_alloc_pool()->debug_check_empty(&result);
|
||||||
@@ -19,7 +17,7 @@ int main()
|
|||||||
|
|
||||||
snmalloc::current_alloc_pool()->debug_check_empty(&result);
|
snmalloc::current_alloc_pool()->debug_check_empty(&result);
|
||||||
if (result != true)
|
if (result != true)
|
||||||
{
|
{
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,7 +33,7 @@ int main()
|
|||||||
|
|
||||||
snmalloc::current_alloc_pool()->debug_check_empty(&result);
|
snmalloc::current_alloc_pool()->debug_check_empty(&result);
|
||||||
if (result != true)
|
if (result != true)
|
||||||
{
|
{
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user