|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
A global operator new that a test can make fail. More...
#include <cstddef>#include <cstdlib>#include <new>Go to the source code of this file.
Macros | |
| #define | ALEPH_ALLOCATION_FAILURE_UNDER_TSAN 0 |
Functions | |
| void * | operator new (const std::size_t size) |
| void * | operator new[] (const std::size_t size) |
| void * | operator new (const std::size_t size, const std::nothrow_t &) noexcept |
| void * | operator new[] (const std::size_t size, const std::nothrow_t &) noexcept |
| void | operator delete (void *p) noexcept |
| void | operator delete[] (void *p) noexcept |
| void | operator delete (void *p, std::size_t) noexcept |
| void | operator delete[] (void *p, std::size_t) noexcept |
| void | operator delete (void *p, const std::nothrow_t &) noexcept |
| void | operator delete[] (void *p, const std::nothrow_t &) noexcept |
A global operator new that a test can make fail.
A test program that includes this header, in one of its source files, replaces the global operator new: while a No_Memory lives, every allocation through it throws std::bad_alloc, and while a Fail_At lives, the one with the number that it was given does. allocations counts them all.
ThreadSanitizer has its own global operator new and delete, which collide with these at link time, so under it nothing is replaced and ALEPH_ALLOCATION_FAILURE_UNDER_TSAN is 1: the tests must skip then.
Definition in file allocation_failure.H.
| #define ALEPH_ALLOCATION_FAILURE_UNDER_TSAN 0 |
Definition at line 62 of file allocation_failure.H.
|
noexcept |
Definition at line 157 of file allocation_failure.H.
|
noexcept |
Definition at line 177 of file allocation_failure.H.
|
noexcept |
Definition at line 167 of file allocation_failure.H.
|
noexcept |
Definition at line 162 of file allocation_failure.H.
|
noexcept |
Definition at line 182 of file allocation_failure.H.
|
noexcept |
Definition at line 172 of file allocation_failure.H.
| void * operator new | ( | const std::size_t | size | ) |
Definition at line 115 of file allocation_failure.H.
|
noexcept |
Definition at line 127 of file allocation_failure.H.
| void * operator new[] | ( | const std::size_t | size | ) |
Definition at line 120 of file allocation_failure.H.
|
noexcept |
Definition at line 139 of file allocation_failure.H.