Clang format.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user