Clang format.

This commit is contained in:
Matthew Parkinson
2020-02-26 20:59:38 +00:00
parent 136dd23932
commit c1c8a7bfee
3 changed files with 26 additions and 28 deletions

View File

@@ -87,12 +87,12 @@ namespace snmalloc
**/
static void register_cleanup()
{
#ifdef USE_SNMALLOC_STATS
# ifdef USE_SNMALLOC_STATS
Singleton<int, atexit_print_stats>::get();
#endif
# endif
}
#ifdef USE_SNMALLOC_STATS
# ifdef USE_SNMALLOC_STATS
static void print_stats()
{
Stats s;
@@ -104,7 +104,7 @@ namespace snmalloc
{
return atexit(print_stats);
}
#endif
# endif
public:
/**
@@ -143,15 +143,15 @@ namespace snmalloc
*/
static SNMALLOC_FAST_PATH Alloc* get()
{
#ifdef USE_MALLOC
# ifdef USE_MALLOC
return get_reference();
#else
# else
auto alloc = get_reference();
auto new_alloc = lazy_replacement(alloc);
return (likely(new_alloc == nullptr)) ?
alloc :
reinterpret_cast<Alloc*>(new_alloc);
#endif
# endif
}
};
@@ -200,7 +200,7 @@ namespace snmalloc
}
};
#ifdef SNMALLOC_USE_THREAD_CLEANUP
# ifdef SNMALLOC_USE_THREAD_CLEANUP
/**
* Entry point that allows libc to call into the allocator for per-thread
* cleanup.
@@ -210,9 +210,9 @@ namespace snmalloc
ThreadAllocLibcCleanup::inner_release();
}
using ThreadAlloc = ThreadAllocLibcCleanup;
#else
# else
using ThreadAlloc = ThreadAllocThreadDestructor;
#endif
# endif
/**
* Slow path for the placeholder replacement. The simple check that this is