summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaan <daanl@outlook.com>2022-02-22 16:46:06 -0800
committerDaan <daanl@outlook.com>2022-02-22 16:46:06 -0800
commit18c18917081e10c4a64e76c6b887ca0fa42fd345 (patch)
treea2181f5e0d08e6b9e1765f40ac173444132d8ea8 /include
parent10da1af59b22e7f0b89ca927cc9b98e7e7eaa64c (diff)
parentf1d7f972a9008fe8043c2a814b7317e41c25b31c (diff)
Merge branch 'dev' into dev-slice
Diffstat (limited to 'include')
-rw-r--r--include/mimalloc-new-delete.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/mimalloc-new-delete.h b/include/mimalloc-new-delete.h
index ba208f0..2749a0b 100644
--- a/include/mimalloc-new-delete.h
+++ b/include/mimalloc-new-delete.h
@@ -25,6 +25,9 @@ terms of the MIT license. A copy of the license can be found in the file
void operator delete(void* p) noexcept { mi_free(p); };
void operator delete[](void* p) noexcept { mi_free(p); };
+ void operator delete (void* p, const std::nothrow_t&) noexcept { mi_free(p); }
+ void operator delete[](void* p, const std::nothrow_t&) noexcept { mi_free(p); }
+
void* operator new(std::size_t n) noexcept(false) { return mi_new(n); }
void* operator new[](std::size_t n) noexcept(false) { return mi_new(n); }
@@ -41,9 +44,11 @@ terms of the MIT license. A copy of the license can be found in the file
void operator delete[](void* p, std::align_val_t al) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }
void operator delete (void* p, std::size_t n, std::align_val_t al) noexcept { mi_free_size_aligned(p, n, static_cast<size_t>(al)); };
void operator delete[](void* p, std::size_t n, std::align_val_t al) noexcept { mi_free_size_aligned(p, n, static_cast<size_t>(al)); };
-
- void* operator new( std::size_t n, std::align_val_t al) noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }
- void* operator new[]( std::size_t n, std::align_val_t al) noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }
+ void operator delete (void* p, std::align_val_t al, const std::nothrow_t& tag) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }
+ void operator delete[](void* p, std::align_val_t al, const std::nothrow_t& tag) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }
+
+ void* operator new (std::size_t n, std::align_val_t al) noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }
+ void* operator new[](std::size_t n, std::align_val_t al) noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }
void* operator new (std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_new_aligned_nothrow(n, static_cast<size_t>(al)); }
void* operator new[](std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_new_aligned_nothrow(n, static_cast<size_t>(al)); }
#endif