summaryrefslogtreecommitdiffstats
path: root/src/jemalloc_cpp.cpp
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2017-01-14 02:17:54 (GMT)
committerJason Evans <jasone@canonware.com>2017-01-17 22:30:15 (GMT)
commit41aa41853c1101c5e6f1b5759b830dff22e560df (patch)
tree5858823ae1311d56d9fe96387ff74ebe92a89aa0 /src/jemalloc_cpp.cpp
parente8990dc7c7b3083ce05823e581780c2b22f5cbbb (diff)
downloadjemalloc-41aa41853c1101c5e6f1b5759b830dff22e560df.zip
jemalloc-41aa41853c1101c5e6f1b5759b830dff22e560df.tar.gz
jemalloc-41aa41853c1101c5e6f1b5759b830dff22e560df.tar.bz2
Fix style nits.
Diffstat (limited to 'src/jemalloc_cpp.cpp')
-rw-r--r--src/jemalloc_cpp.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/jemalloc_cpp.cpp b/src/jemalloc_cpp.cpp
index 84d47ae..5cecfdb 100644
--- a/src/jemalloc_cpp.cpp
+++ b/src/jemalloc_cpp.cpp
@@ -17,26 +17,25 @@
void *operator new(std::size_t size);
void *operator new[](std::size_t size);
-void *operator new(std::size_t size, const std::nothrow_t&) noexcept;
-void *operator new[](std::size_t size, const std::nothrow_t&) noexcept;
-void operator delete(void* ptr) noexcept;
-void operator delete[](void* ptr) noexcept;
-void operator delete(void* ptr, const std::nothrow_t&) noexcept;
-void operator delete[](void* ptr, const std::nothrow_t&) noexcept;
+void *operator new(std::size_t size, const std::nothrow_t &) noexcept;
+void *operator new[](std::size_t size, const std::nothrow_t &) noexcept;
+void operator delete(void *ptr) noexcept;
+void operator delete[](void *ptr) noexcept;
+void operator delete(void *ptr, const std::nothrow_t &) noexcept;
+void operator delete[](void *ptr, const std::nothrow_t &) noexcept;
#if __cpp_sized_deallocation >= 201309
/* C++14's sized-delete operators. */
-void operator delete(void* ptr, std::size_t size) noexcept;
-void operator delete[](void* ptr, std::size_t size) noexcept;
+void operator delete(void *ptr, std::size_t size) noexcept;
+void operator delete[](void *ptr, std::size_t size) noexcept;
#endif
-
template <bool IsNoExcept>
JEMALLOC_INLINE
void *
newImpl(std::size_t size) noexcept(IsNoExcept)
{
- void* ptr = je_malloc(size);
+ void *ptr = je_malloc(size);
if (likely(ptr != nullptr))
return (ptr);
@@ -55,7 +54,7 @@ newImpl(std::size_t size) noexcept(IsNoExcept)
try {
handler();
- } catch (const std::bad_alloc&) {
+ } catch (const std::bad_alloc &) {
break;
}
@@ -80,36 +79,36 @@ operator new[](std::size_t size)
}
void *
-operator new(std::size_t size, const std::nothrow_t&) noexcept
+operator new(std::size_t size, const std::nothrow_t &) noexcept
{
return (newImpl<true>(size));
}
void *
-operator new[](std::size_t size, const std::nothrow_t&) noexcept
+operator new[](std::size_t size, const std::nothrow_t &) noexcept
{
return (newImpl<true>(size));
}
void
-operator delete(void* ptr) noexcept
+operator delete(void *ptr) noexcept
{
je_free(ptr);
}
void
-operator delete[](void* ptr) noexcept
+operator delete[](void *ptr) noexcept
{
je_free(ptr);
}
void
-operator delete(void* ptr, const std::nothrow_t&) noexcept
+operator delete(void *ptr, const std::nothrow_t &) noexcept
{
je_free(ptr);
}
-void operator delete[](void* ptr, const std::nothrow_t&) noexcept
+void operator delete[](void *ptr, const std::nothrow_t &) noexcept
{
je_free(ptr);
}
@@ -117,12 +116,12 @@ void operator delete[](void* ptr, const std::nothrow_t&) noexcept
#if __cpp_sized_deallocation >= 201309
void
-operator delete(void* ptr, std::size_t size) noexcept
+operator delete(void *ptr, std::size_t size) noexcept
{
je_sdallocx(ptr, size, /*flags=*/0);
}
-void operator delete[](void* ptr, std::size_t size) noexcept
+void operator delete[](void *ptr, std::size_t size) noexcept
{
je_sdallocx(ptr, size, /*flags=*/0);
}